Skip to content
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

Version 0.24.1 fails to install on Alpine Linux #25207

Closed
snordhausen opened this issue Feb 7, 2019 · 4 comments
Closed

Version 0.24.1 fails to install on Alpine Linux #25207

snordhausen opened this issue Feb 7, 2019 · 4 comments
Labels
Duplicate Report Duplicate issue or pull request

Comments

@snordhausen
Copy link

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'
@jorisvandenbossche
Copy link
Member

@snordhausen Thanks for the report! I think is this a duplicate of #25193

@jorisvandenbossche jorisvandenbossche added the Duplicate Report Duplicate issue or pull request label Feb 7, 2019
@jorisvandenbossche jorisvandenbossche added this to the No action milestone Feb 7, 2019
@fergyfresh
Copy link

I'm getting this error too. Do we have a solution?

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Mar 8, 2019 via email

@fergyfresh
Copy link

Ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request
Projects
None yet
Development

No branches or pull requests

4 participants