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

pip 10 breaks pandas on alpine linux #5299

Closed
jpds opened this issue Apr 19, 2018 · 15 comments
Closed

pip 10 breaks pandas on alpine linux #5299

jpds opened this issue Apr 19, 2018 · 15 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR type: support User Support

Comments

@jpds
Copy link

jpds commented Apr 19, 2018

  • 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.

@pfmoore
Copy link
Member

pfmoore commented Apr 19, 2018

Duplicate of #5298

@pfmoore pfmoore marked this as a duplicate of #5298 Apr 19, 2018
@benoit-pierre
Copy link
Member

@jpds: could you check with #5286 (to install: pip install https://github.com/benoit-pierre/pip/archive/improve_pep518_build_requirements_handling.zip)?

@jpds
Copy link
Author

jpds commented Apr 19, 2018

@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

@jpds
Copy link
Author

jpds commented Apr 19, 2018

Appears to still be supported on 2.7: https://docs.scipy.org/doc/numpy/user/building.html

@benoit-pierre
Copy link
Member

Does this work: pip install -v --no-binary :all: cython?

@jpds
Copy link
Author

jpds commented Apr 19, 2018

Yep, attached log.

cython-pip-install.txt

@benoit-pierre
Copy link
Member

Sorry, meant pip install -v --only-binary :all: cython!

@benoit-pierre
Copy link
Member

The current PEP 518 implementation does not support installing build requirements from source.

@jpds
Copy link
Author

jpds commented Apr 19, 2018

That just returns DistributionNotFound: No matching distribution found for cython which I think is because of docker-library/docs#904

@benoit-pierre
Copy link
Member

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

@pradyunsg pradyunsg added type: support User Support resolution: duplicate Duplicate of an existing issue/PR labels Apr 20, 2018
@pradyunsg
Copy link
Member

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 pradyunsg added the S: awaiting response Waiting for a response/more information label Apr 20, 2018
@jorisvandenbossche
Copy link

jorisvandenbossche commented Apr 24, 2018

@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 #5229

@pradyunsg
Copy link
Member

Indeed. Thanks for correcting me @jorisvandenbossche! :)

My bad -- I guess I had too many open tabs and couldn't keep track of my clipboard.

@benoit-pierre
Copy link
Member

Shouldn't this be closed as a duplicate of #5229 then?

@lock
Copy link

lock bot commented Jun 2, 2019

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.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR type: support User Support
Projects
None yet
Development

No branches or pull requests

5 participants