pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.48k stars 3.01k forks source link

`pip` 21 breaks `find-links` #9958

Closed mboisson closed 3 years ago

mboisson commented 3 years ago

Description

For the same configuration, with pip under version 21 :

$ pip install nose numpy pytest --no-cache --find-links=/home/mboisson/wheels
Ignoring pip: markers 'python_version < "3"' don't match your environment
Looking in links: /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo/avx2, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo/generic, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic, /home/mboisson/wheels
Processing /home/mboisson/wheels/nose-1.3.7-py3-none-any.whl
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo/generic/numpy-1.19.5-cp36-cp36m-linux_x86_64.whl

while with version 21.x :

$ pip install nose numpy pytest --no-cache --find-links=/home/mboisson/wheels
Looking in links: /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo/avx2, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo/generic, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic, /home/mboisson/wheels
Collecting nose
  Downloading nose-1.3.7-py3-none-any.whl (154 kB)
     |████████████████████████████████| 154 kB 14.4 MB/s
Processing /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo/generic/numpy-1.19.5-cp36-cp36m-linux_x86_64.whl
Collecting pytest
  Downloading pytest-6.2.4-py3-none-any.whl (280 kB)
     |████████████████████████████████| 280 kB 21.2 MB/s
Collecting packaging
  Downloading packaging-20.9-py2.py3-none-any.whl (40 kB)
     |████████████████████████████████| 40 kB 66.4 MB/s

Why is the new version downloading wheels from pipy instead of using the local directories ?

Expected behavior

Keep the same behavior as previous versions

pip version

21.1

Python version

3.x

OS

CentOS

How to Reproduce

Run a pip install with --find-links in a local folder. See that it now ignores that.

Output

No response

Code of Conduct

uranusjr commented 3 years ago

It does not ignore --find-links, it just prefers to download from indexes now. If you don't want it to use any indexes, supply --no-index.

mboisson commented 3 years ago

How do I make it back so that it prefers local ? We don't want it to block indexes, we want it to prefer local.

What is the point of even providing --find-links if it won't use it preferentially ?

ccoulombe commented 3 years ago

How does one prefers local built wheels first over PyPI in this case? (This discussion occurred in the past and it was solved because --find-links would prefer the local wheels.)