尝试使用 pip install pandas 时给出的双重要求
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/49608953/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Double requirement given when trying to use pip install pandas
提问by Stijn
I want to build a Docker container using a Dockerfile containing pip install -r requirements.txt
. pandas==0.22.0 is included in this requirements.txt file. Untill two days ago, the Docker container was perfectly build. Starting from yesterday, I receive an error:
我想使用包含pip install -r requirements.txt
. pandas==0.22.0 包含在这个 requirements.txt 文件中。直到两天前,Docker容器才完美构建。从昨天开始,我收到一个错误:
Double requirement given: numpy==1.12.1 from https://pypi.python.org/packages/02/64/c6c1c24ff4dbcd789fcfdb782e343ac23c074f6b8b03e818ff60eb0f937f/numpy-1.12.1-cp34-cp34m-manylinux1_x86_64.whl#md5=6288d4e9cfea859e03dc82879539d029(already in numpy==1.9.3 from https://pypi.python.org/packages/fc/1b/a1717502572587c724858862fd9b98a66105f3a3443225bda9a1bd16ee14/numpy-1.9.3-cp34-cp34m-manylinux1_x86_64.whl#md5=e1130c8f540a759d79ba5e8960f6915a, name='numpy')
双重要求给出:从numpy的== 1.12.1 https://pypi.python.org/packages/02/64/c6c1c24ff4dbcd789fcfdb782e343ac23c074f6b8b03e818ff60eb0f937f/numpy-1.12.1-cp34-cp34m-manylinux1_x86_64.whl#md5=6288d4e9cfea859e03dc82879539d029(已经在numpy的== 1.9.3从 https://pypi.python.org/packages/fc/1b/a1717502572587c724858862fd9b98a66105f3a3443225bda9a1bd16ee14/numpy-1.9.3-cp34-cp34m-manylinux1_x86_64.whl#md5=e1130c8f540a759d79ba5e8960f6915a,名称= 'numpy的')
This error occurs both on Mac (Docker version: 18.03.0-ce-mac58 (23607)) and Ubuntu 16.04.3 (Docker version: 17.12.0-ce, build c97c6d6).
此错误在 Mac(Docker 版本:18.03.0-ce-mac58 (23607))和 Ubuntu 16.04.3(Docker 版本:17.12.0-ce,构建 c97c6d6)上都会发生。
I already tried to use different versions op pandas, to preinstall numpy, to remove pands from the requirements.txt file and install it seperately. As well as trying to install with apt-get install python-pandas
. For the latter solution pandas v14 was installed, while I need at least v19.
我已经尝试使用不同版本的 op pandas,预安装 numpy,从 requirements.txt 文件中删除 pands 并单独安装。以及尝试使用apt-get install python-pandas
. 对于后一种解决方案,安装了pandas v14,而我至少需要v19。
回答by Shinto Joseph
I finally found the solution for this in case of python3 or pip3
在 python3 或 pip3 的情况下,我终于找到了解决方案
pip3 install pandas --no-build-isolation
Worked for me
对我来说有效
Hope this helps
希望这可以帮助
Thanks
谢谢
回答by SDK4551
Might be of use to those who are working on Python3.4:
可能对那些正在使用 Python3.4 的人有用:
pip3 install 'pandas<0.21'
worked for me. Hope this helps.
对我来说有效。希望这可以帮助。