Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Double requirement given when trying to use pip install pandas

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:

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

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

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.

like image 457
Stijn Avatar asked Apr 02 '18 09:04

Stijn


People also ask

Why pip install is not working?

This error usually means there's a problem with the Python installation or the system variable PATH is not set up correctly. Try reinstalling Python and all its components to fix the problem. The easiest way is via the Python executable installer.

How do you pip a panda?

Enter the command “pip install pandas” on the terminal. This should launch the pip installer. The required files will be downloaded, and Pandas will be ready to run on your computer. After the installation is complete, you will be able to use Pandas in your Python programs.

What does pip install requirements do?

The pip install <package> command always looks for the latest version of the package and installs it. It also searches for dependencies listed in the package metadata and installs them to ensure that the package has all the requirements that it needs.


2 Answers

I finally found the solution for this in case of python3 or pip3

pip3 install pandas --no-build-isolation
like image 178
Shinto Joseph Avatar answered Sep 20 '22 17:09

Shinto Joseph


As of December 2020, in my case, upgrading pip to version 20.3 worked well.

like image 40
Asif Patankar Avatar answered Sep 16 '22 17:09

Asif Patankar