【问题标题】:Unable to Install Pandas on Cents 7 Linux Server无法在 Centos 7 Linux 服务器上安装 Pandas
【发布时间】: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


    【解决方案1】:

    您必须以 root 权限执行安装。

    sudo pip3 install pandas
    

    或者

    pip3 install --user pandas
    

    【讨论】:

    • 你好,我也是这样做的,只用 sudo 安装了软件包,它不工作请建议
    • 如果你只安装numpy,你会得到同样的错误信息吗?
    • 能否分享一下pip3 list命令返回的实际安装包列表
    • 熊猫、django、请求、urlbe3、django-export-import。只有这些
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-23
    • 1970-01-01
    • 1970-01-01
    • 2016-11-13
    • 1970-01-01
    • 2012-04-26
    相关资源
    最近更新 更多