Skip to content

Version 0.24.1 fails to install on Alpine Linux #25207

Closed
@snordhausen

Description

@snordhausen

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'

Activity

jorisvandenbossche

jorisvandenbossche commented on Feb 7, 2019

@jorisvandenbossche
Member

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

added this to the No action milestone on Feb 7, 2019
fergyfresh

fergyfresh commented on Mar 8, 2019

@fergyfresh

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

TomAugspurger

TomAugspurger commented on Mar 8, 2019

@TomAugspurger
Contributor
fergyfresh

fergyfresh commented on Mar 8, 2019

@fergyfresh

Ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jorisvandenbossche@TomAugspurger@snordhausen@fergyfresh

        Issue actions

          Version 0.24.1 fails to install on Alpine Linux · Issue #25207 · pandas-dev/pandas