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
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
.
Duplicate of #5298
@jpds: could you check with #5286 (to install: pip install https://github.com/benoit-pierre/pip/archive/improve_pep518_build_requirements_handling.zip
)?
@benoit-pierre Slightly better but it still errors:
/ # pip install https://github.com/benoit-pierre/pip/archive/improve_pep518_build_requirements_handling.zip
Collecting https://github.com/benoit-pierre/pip/archive/improve_pep518_build_requirements_handling.zip
Downloading https://github.com/benoit-pierre/pip/archive/improve_pep518_build_requirements_handling.zip
\ 6.5MB 66.4MB/s
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Running setup.py install for pip ... done
Successfully installed pip-10.0.0
/ # 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 2.9MB/s
Installing build dependencies ... error
Complete output from command /usr/local/bin/python -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-QA0Sta --no-warn-script-location --only-binary :all: -i https://pypi.org/simple -- wheel setuptools Cython "numpy==1.9.3; python_version=='3.5'" "numpy==1.12.1; python_version=='3.6'" "numpy==1.13.1; python_version>='3.7'":
Ignoring numpy: markers 'python_version == "3.5"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.7"' don't match your environment
Collecting wheel
Downloading https://files.pythonhosted.org/packages/1b/d2/22cde5ea9af055f81814f9f2545f5ed8a053eb749c08d186b369959189a8/wheel-0.31.0-py2.py3-none-any.whl (41kB)
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/20/d7/04a0b689d3035143e2ff288f4b9ee4bf6ed80585cc121c90bfd85a1a8c2e/setuptools-39.0.1-py2.py3-none-any.whl (569kB)
Collecting Cython
Could not find a version that satisfies the requirement Cython (from versions: )
No matching distribution found for Cython
Appears to still be supported on 2.7: https://docs.scipy.org/doc/numpy/user/building.html
Does this work: pip install -v --no-binary :all: cython
?
Yep, attached log.
Sorry, meant pip install -v --only-binary :all: cython
!
The current PEP 518 implementation does not support installing build requirements from source.
That just returns DistributionNotFound: No matching distribution found for cython
which I think is because of https://github.com/docker-library/docs/issues/904
Right, so you'll have to use one of this 2 workarounds to install pandas:
pip wheel -w wheels_dir cython && pip install -f wheels_dir pandas
pip install cython && pyp install --no-build-isolation pandas
Thanks for filing this issue @jpds!
As noted, this is a duplicate of #5298. Feel free to close this issue if you don't have any more questions. :)
@pradyunsg small note: this is not a duplicate of #5298 (that is actually about the version specification in toml files not yet fully supported (which results in not finding a wheel), this is about build dependencies needing to be installable from wheels in general), but rather a duplicate of https://github.com/pypa/pip/issues/5229
Indeed. Thanks for correcting me @jorisvandenbossche! :)
My bad -- I guess I had too many open tabs and couldn't keep track of my clipboard.
Shouldn't this be closed as a duplicate of #5229 then?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Right, so you'll have to use one of this 2 workarounds to install pandas:
pip wheel -w wheels_dir cython && pip install -f wheels_dir pandas
pip install cython && pyp install --no-build-isolation pandas