无法在venv中安装pandas

k5hmc34c  于 2023-06-20  发布在  其他
关注(0)|答案(4)|浏览(110)

在虚拟环境中,安装numpy没有问题后,我运行

pip3 install pandas

其返回:编辑:

Collecting pandas
  Using cached https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz
  Installing build dependencies ... error
  Complete output from command /home/bonzay/Desktop/Final_Project/venv/bin/python3.4 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-4pcvmc12 https://files.pythonhosted.org/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl#sha256=80044e51ec5bbf6c894ba0bc48d26a8c20a9ba629f4ca19ea26ecfcf87685f5f https://files.pythonhosted.org/packages/8c/10/79282747f9169f21c053c562a0baa21815a8c7879be97abd930dbcf862e8/setuptools-39.1.0-py2.py3-none-any.whl#sha256=0cb8b8625bfdcc2d43ea4b9cdba0b39b2b7befc04f3088897031082aa16ce186 https://files.pythonhosted.org/packages/70/25/1e1521e6ce2cf78ff4a8b06fbc2cd513ce004ec337000eddfe016fdf3fc6/Cython-0.28.2-cp34-cp34m-manylinux1_x86_64.whl#sha256=85f7432776870d65639fed00f951a3c05ef1e534bc72a73cd1200d79b9a7d7d0 https://files.pythonhosted.org/packages/fc/1b/a1717502572587c724858862fd9b98a66105f3a3443225bda9a1bd16ee14/numpy-1.9.3-cp34-cp34m-manylinux1_x86_64.whl#sha256=bff36563f9d6a06a81ae232f49d2946c84c05e391a7dff057496033c79507860 https://files.pythonhosted.org/packages/02/64/c6c1c24ff4dbcd789fcfdb782e343ac23c074f6b8b03e818ff60eb0f937f/numpy-1.12.1-cp34-cp34m-manylinux1_x86_64.whl#sha256=4eac5f2f624c5e7eecbdb51395ff39a099c48cab607a158f16f288c6fe39a2b3 https://files.pythonhosted.org/packages/1b/ee/f65826b2880f67652c21326565b4c166c7cdb1019f84b82af65e625475cd/numpy-1.13.1-cp34-cp34m-manylinux1_x86_64.whl#sha256=838e48df3703c8747f355cd6386e0680b906a2f7b2bbd304e8a2d531692484ce:
  Double requirement given: numpy==1.12.1 from https://files.pythonhosted.org/packages/02/64/c6c1c24ff4dbcd789fcfdb782e343ac23c074f6b8b03e818ff60eb0f937f/numpy-1.12.1-cp34-cp34m-manylinux1_x86_64.whl#sha256=4eac5f2f624c5e7eecbdb51395ff39a099c48cab607a158f16f288c6fe39a2b3 (already in numpy==1.9.3 from https://files.pythonhosted.org/packages/fc/1b/a1717502572587c724858862fd9b98a66105f3a3443225bda9a1bd16ee14/numpy-1.9.3-cp34-cp34m-manylinux1_x86_64.whl#sha256=bff36563f9d6a06a81ae232f49d2946c84c05e391a7dff057496033c79507860, name='numpy')

numpy和pandas都是全局安装的,没有任何问题。我尝试重新安装numpy,升级pip3,重新安装安装工具。没有任何工作如预期,因为我甚至不明白的错误消息.

dw1jzc5e

dw1jzc5e1#

我也有同样的问题![Ubuntu 16, python 3.5]在使用python3 -m venv .env创建虚拟环境后,我无法在.env虚拟环境中安装pandas。我是这样修复的:
我的virtualenv的pip版本是pip-8.1.1.,我运行以下命令将其升级到pip-20.0.2

pip install --upgrade pip

然后,运行pip install pandas在我的虚拟环境中成功安装了pandas!

Successfully installed numpy-1.18.1 pandas-0.24.2 python-dateutil-2.8.1 pytz-2019.3 six-1.14.0
xxslljrj

xxslljrj2#

我发现了这个为我做的工作:

Double requirement given when trying to use pip install pandas

Double requirement given when trying to use pip install pandas

pip3 install 'pandas<0.21'
bvhaajcl

bvhaajcl3#

不知道你的问题是什么。你应该把你从一开始所做的一切都写下来。您是否已激活虚拟环境?如果你没有,这是你可以做到的:

virtualenv venv
venv/bin/activate
brc7rcf0

brc7rcf04#

对于现有的python3虚拟环境,我们需要首先重新激活venv,这里我展示了一个例子,当我为Sherlock设置vent时,它错过了'pandas'模块。

cd /home/user/Sherlock
source SherlockEnvironment/bin/activate
pip3 install pandas

相关问题