【发布时间】:2020-12-08 06:00:59
【问题描述】:
我有一个 Centos7 linux 服务器,在上面我已经部署了 Django 应用程序,现在我必须在应用程序中使用 pandas,但是使用 pip3.6 命令安装 pandas 后出现以下错误,请有人帮忙
ImportError at /
Unable to import required dependencies:
numpy:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.6 from "/usr/local/bin/python3"
* The NumPy version is: "1.19.4"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: /var/www/project/venv/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-x86_64-linux-gnu.so: failed to map segment from shared object: Permission denied Request Method: GET Request URL: http://192.168.225.45/ Django Version: 3.1 Exception Type: ImportError Exception Value: Unable to import required dependencies: numpy:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.6 from "/usr/local/bin/python3" * The NumPy version is: "1.19.4"
and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.
Original error was: /var/www/project/venv/lib/python3.6/site-packages/numpy/core/_multiarray_umath.cpython-36m-x86_64-linux-gnu.so: failed to map segment from shared object: Permission denied Exception Location: /var/www/project/venv/lib/python3.6/site-packages/pandas/__init__.py, line 17, in <module> Python Executable: /usr/local/bin/python3 Python Version: 3.6.9 Python Path: ['/var/www/project/bookmarks', '/var/www/project/venv/lib64/python36.zip', '/var/www/project/venv/lib64/python3.6', '/var/www/project/venv/lib64/python3.6/lib-dynload', '/opt/rh/rh-python36/root/usr/lib64/python3.6', '/opt/rh/rh-python36/root/usr/lib/python3.6', '/var/www/project/venv/lib/python3.6/site-packages'] Server time: Tue, 08 Dec 2020 05:59:17 +0000 Traceback Switch to copy-and-paste view /var/www/project/venv/lib/python3.6/site-packages/django/core/handlers/exception.py, line 47, in inner
response = get_response(request) …
【问题讨论】:
标签: python django pandas numpy centos7