Closed
Description
Running pip3 install pandas==0.24.1
fails on Alpine Linux. Downgrading pandas to version 0.23.4 fixes the issue. Note that on Alpine Linux, both numpy and pandas get compiled (in contrast to e.g. Ubuntu, which is not affected).
I managed to reproduce the issue with the following Dockerfile
:
FROM alpine:3.8
RUN apk update
RUN apk add g++ libstdc++ python3-dev bash git
RUN pip3 install --upgrade pip
# broken:
RUN pip3 install pandas==0.24.1
# also broken: RUN pip3 install numpy==1.16.1 pandas==0.24.1
# also broken: RUN pip3 install numpy==1.16.1 pandas==0.24.0
# also broken: RUN pip3 install numpy==1.15.4 pandas==0.24.1
# also broken: RUN pip3 install numpy==1.16.1 git+https://github.com/pandas-dev/pandas
# works: downgrade pandas
# RUN pip3 install pandas==0.23.4
# also works: first install numpy, then pandas
# RUN pip3 install numpy==1.16.1
# RUN pip3 install pandas==0.24.1
The error also occurs if Alpine 3.9 is used or if pip3 is not upgraded.
The error message is:
Collecting numpy==1.16.1
Downloading https://files.pythonhosted.org/packages/2b/26/07472b0de91851b6656cbc86e2f0d5d3a3128e7580f23295ef58b6862d6c/numpy-1.16.1.zip (5.1MB)
Collecting pandas==0.24.1
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/lib/python3.6/site-packages/pkg_resources/__init__.py", line 346, 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-ppyqs3w_/pandas/setup.py", line 732, in <module>
ext_modules=maybe_cythonize(extensions, compiler_directives=directives),
File "/tmp/pip-install-ppyqs3w_/pandas/setup.py", line 475, in maybe_cythonize
numpy_incl = pkg_resources.resource_filename('numpy', 'core/include')
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1136, in resource_filename
return get_provider(package_or_requirement).get_resource_filename(
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 348, in get_provider
__import__(moduleOrReq)
ModuleNotFoundError: No module named 'numpy'
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
jorisvandenbossche commentedon Feb 7, 2019
@snordhausen Thanks for the report! I think is this a duplicate of #25193
fergyfresh commentedon Mar 8, 2019
I'm getting this error too. Do we have a solution?
TomAugspurger commentedon Mar 8, 2019
fergyfresh commentedon Mar 8, 2019
Ok.