简体   繁体   中英

Unable to Install Pandas on Cents 7 Linux Server

I have a Centos7 linux server, on that i have deployed Django application, now i have to use pandas in the application, but post installing the pandas by using pip3.6 command and i am getting below error, please someone help

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) …

You have to execute the installation with root permissions.

sudo pip3 install pandas

or alternatively

pip3 install --user pandas

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM