-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIP 19.0.2 breaks numpy/pandas install #6262
Comments
same issue here: |
@cdagraca Do the warnings also occur with < 19? Can you include what the successful output looks like for comparison? |
@cjerdonek output pinning PIP < 19.0 is significantly different - those warning are not there, but it's not directly comparable:
|
It seems that you are using old
Try first upgrade I tried and got following successful installation log:
Also if you'd upgrade Python it will be possible to use pre-built wheels for |
@cdagraca as @daa says in your docker script, you're upgrading (the system) pip and installing the other requirements all in a single command. That doesn't guarantee which version of pip will be getting used to install the other requirements. Do you still see the error if you split the pip upgrade and the requirements install into separate steps?
|
@pfmoore I have tried it both ways. Splitting the install as you suggest still results in
|
Try to use |
Since this is Debian and the Docker file is attempting to overwrite the system pip with a pip-installed one, this has a high chance of being a modified symptom of the fact that doing that isn't supported by either pip or Debian problem: #5599 Especially suspicious is the warning about python_requires not being supported, which suggests an ancient setuptools is getting invoked somewhere. |
Right, that isn't a pip bug. There's an issue opened in pandas's repository for the same error message. pandas-dev/pandas#25193 I'm inclined to go ahead and close this issue, since the 2 problems here (upgrading pip simultaneously w/ other packages & the pandas build bug) aren't something that have any actionable things from pip's POV. |
I was thinking.. Issues like this make me wonder if pip should be doing something like logging its version number prior to the first log message, possibly along with other info about itself. The message could be as unobtrusive as a single This could perhaps cut down on a lot of the troubleshooting time for both users and maintainers because they would immediately see that the version of pip they thought was running isn't. @cdagraca, would that have helped in this case? |
this is how I was doing it until last week for building:
that worked, specifying pandas version. then I had to rebuild the image again, and now, albeit being installed, I get import error within the application.
|
Sorry, is this working for people? I'm not able to install. $ cat requirements.prod.txt
numpy==1.16.2
pandas==0.24.1
$ cat Dockerfile
FROM python:3.7.2-alpine
COPY ./requirements.prod.txt requirements.prod.txt
RUN apk --no-cache add build-base python-dev
RUN pip install -r requirements.prod.txt
$ docker build --tag $(basename $PWD) .
Sending build context to Docker daemon 68.57MB
Step 1/5 : FROM python:3.7.2-alpine
---> bb1ccaa5880c
Step 2/5 : COPY ./requirements.prod.txt requirements.prod.txt
---> Using cache
---> 863ea77c39c2
Step 3/5 : RUN apk --no-cache add build-base python-dev
---> Using cache
---> 7a57d7c6c0b2
Step 4/5 : RUN pip install -r requirements.prod.txt
---> Running in 121ec7af246d
Collecting numpy==1.16.2 (from -r requirements.prod.txt (line 1))
Downloading https://files.pythonhosted.org/packages/cf/8d/6345b4f32b37945fedc1e027e83970005fc9c699068d2f566b82826515f2/numpy-1.16.2.zip (5.1MB)
Collecting pandas==0.24.1 (from -r requirements.prod.txt (line 2))
Downloading https://files.pythonhosted.org/packages/81/fd/b1f17f7dc914047cd1df9d6813b944ee446973baafe8106e4458bfb68884/pandas-0.24.1.tar.gz (11.8MB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 359, in get_provider
module = sys.modules[moduleOrReq]
KeyError: 'numpy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-2h0zq9b9/pandas/setup.py", line 732, in <module>
ext_modules=maybe_cythonize(extensions, compiler_directives=directives),
File "/tmp/pip-install-2h0zq9b9/pandas/setup.py", line 475, in maybe_cythonize
numpy_incl = pkg_resources.resource_filename('numpy', 'core/include')
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1144, in resource_filename
return get_provider(package_or_requirement).get_resource_filename(
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 361, in get_provider
__import__(moduleOrReq)
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-2h0zq9b9/pandas/
The command '/bin/sh -c pip install -r requirements.prod.txt' returned a non-zero code: 1 Using something like this works, but it seems like it's something pip should be doing: RUN cat requirements.prod.txt | grep -v '^#' | while read line; do pip install "$line"; done |
Sorry, I had same problem using 'FROM python:3.7.2-alpine'. The Dockerfile and requirement.txt are bellow . Docker file# set docker image
FROM python:3.7.2
# set working directory
WORKDIR /docker_work
# add all file to docker
ADD . .
RUN pip3 install -r requirements.txt
# exec command
CMD [ "python", "-V" ] requirements.txt
docker command
|
@uchida-takumi thanks for the tip, it does seem like it's happening in |
Closing as there is nothing to do on pip side here. |
Environment
Docker build off base of
ubuntu:trusty
Description
Numpy install appears to succeed, but with warnings
Subsequent pandas install can't find numpy
Pinning pip to 19.0.1 changes the error to the issue reported here: #6163
Pinning pip to <19.0 resolves it.
Expected behavior
The packages should install
How to Reproduce
Output
The text was updated successfully, but these errors were encountered: