pip: pip 10 breaks pandas on alpine linux

  • Pip version: 10.0
  • Python version: 2.7.14
  • Operating system: Alpine 3.7

Description:

Installing pandas on alpine3.7 with pip10 fails with:

  Could not find a version that satisfies the requirement Cython (from versions: )
No matching distribution found for Cython

What I’ve run:

This is what happens with pip9:

$ sudo docker run --rm -it --entrypoint sh python:2.7.14-alpine3.7
/ # apk add --update build-base
...
/ # pip install pandas
Collecting pandas
  Using cached https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz
Collecting python-dateutil (from pandas)
  Downloading https://files.pythonhosted.org/packages/0c/57/19f3a65bcf6d5be570ee8c35a5398496e10a0ddcbc95393b2d17f86aaaf8/python_dateutil-2.7.2-py2.py3-none-any.whl (212kB)
    100% |████████████████████████████████| 215kB 1.8MB/s 
Collecting pytz>=2011k (from pandas)
  Downloading https://files.pythonhosted.org/packages/dc/83/15f7833b70d3e067ca91467ca245bae0f6fe56ddc7451aa0dc5606b120f2/pytz-2018.4-py2.py3-none-any.whl (510kB)
    100% |████████████████████████████████| 512kB 2.0MB/s 
Collecting numpy>=1.9.0 (from pandas)
  Downloading https://files.pythonhosted.org/packages/0b/66/86185402ee2d55865c675c06a5cfef742e39f4635a4ce1b1aefd20711c13/numpy-1.14.2.zip (4.9MB)
    100% |████████████████████████████████| 4.9MB 290kB/s 
Collecting six>=1.5 (from python-dateutil->pandas)
  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Building wheels for collected packages: pandas, numpy
  Running setup.py bdist_wheel for pandas ...

This is what happens with pip10:

$ sudo docker run --rm -it --entrypoint sh python:2.7.14-alpine3.7
/ # apk add --update build-base
...
/ # pip install -U pip
...
/ # pip install pandas
Collecting pandas
  Downloading https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz (11.3MB)
    100% |████████████████████████████████| 11.3MB 1.9MB/s 
  Could not find a version that satisfies the requirement Cython (from versions: )
No matching distribution found for Cython

However, I can just install cython with pip install cython.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Right, so you’ll have to use one of this 2 workarounds to install pandas:

  • build a wheel for Cython first: pip wheel -w wheels_dir cython && pip install -f wheels_dir pandas
  • or install it first (and the other build dependencies) and disable build isolation: pip install cython && pyp install --no-build-isolation pandas