Option `index-url = ` for specific commands doesn't set index-url to PyPI
See original GitHub issue- Pip version: 18.1 (and others, see below)
- Python version: 3.7.2 (and others, see below)
- Operating system: Windows 7 (and others, see below)
In the [global]
section of my pip.ini
I set index-url to a non-standard value. In the sections for some commands ([download]
, [list]
, [search]
) I use index-url =
to reset the index-url for these commands to the standard value (PyPI). Since the last update of my python environment that doesn’t work anymore:
pip download
tries to access the non-standard index-url given in the[global]
section, not PyPI. The same is true for the version check of pip at the end of the command execution.pip list
tries to access the non-standard index-url given in the[global]
section, not PyPI, for the version check of pip at the end of the command execution.- Strangely,
pip search
works as expected.
I can reproduce this new and unexpected behaviour with
- pip 18.1 - Python 3.7.2 - Windows 7
- pip 10.0.1 - Python 3.7.1 - Windows 10
- pip 18.1 - Python 3.6.4 - Windows 7
Everything used to work and still works as expected for
- pip 9.0.1 - Python 3.6.4 - Windows 7
- pip 9.0.3 - Python 2.7.15 - Windows 7
All five configurations mentioned use the same pip.ini
.
I had a look at the release notes of pip 10 and a few of the issues mentioned there. I couldn’t find anything that indicates that the change of behaviour is intended.
I also searched the issues for “index-url =”, but none of the search results seems to be about the problem I encounter.
Here are some details / examples (pip 18.1, Python 3.7.2, Windows 7):
C:\>py -m pip config list
download.dest='E:\\zuInst.pip\\download'
download.index-url=''
download.no-index='false'
global.index-url='-'
global.log='E:\\zuInst.pip\\pip.log'
global.no-cache-dir='false'
global.no-index='true'
install.find-links='\nE:\\zuInst-erl\\PyPIP\nE:\\zuInst.pip\\wheel'
install.only-binary=':all:'
install.upgrade-strategy='only-if-needed'
list.find-links='\nE:\\zuInst-erl\\PyPIP'
list.format='columns'
list.index-url=''
list.no-index='false'
search.find-links='\nE:\\zuInst-erl\\PyPIP'
search.index-url=''
search.no-index='false'
wheel.find-links='\nE:\\zuInst.pip\\download'
wheel.wheel-dir='E:\\zuInst.pip\\wheel'
C:\>py -m pip download wheel
Looking in indexes: -
Collecting wheel
Url '-/wheel/' is ignored. It is either a non-existing path or lacks a specific scheme.
Could not find a version that satisfies the requirement wheel (from versions:)
No matching distribution found for wheel
Url '-/pip/' is ignored. It is either a non-existing path or lacks a specific scheme.
C:\>py -m pip list
Package Version
---------- ----------
numpy 1.15.4+mkl
Pillow 5.4.1
pip 18.1
pywin32 224
scipy 1.2.0
setuptools 40.6.2
Url '-/pip/' is ignored. It is either a non-existing path or lacks a specific scheme.
Here in contrast a version that works (pip 9.0.3, Python 2.7.15, Windows 7, same pip.ini
as above):
C:\>py -2 -m pip download wheel
Collecting wheel
Downloading https://files.pythonhosted.org/packages/ff/47/1dfa4795e24fd6f93d5d58602dd716c3f101cfd5a77cd9acbe519b44a0a9/wheel-0.32.3-py2.py3-none-any.whl
Saved e:\zuinst.pip\download\wheel-0.32.3-py2.py3-none-any.whl
Successfully downloaded wheel
You are using pip version 9.0.3, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\>py -2 -m pip list
Package Version
---------- -------
ipython 0.13
numpy 1.9.2
oletools 0.50
PIL 1.1.7
pip 9.0.3
py2exe 0.6.9
pyreadline 2.1
pywin32 224
setuptools 39.0.1
wheel 0.29.0
You are using pip version 9.0.3, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top GitHub Comments
cf #589 & #395 for context.
Yeah, later when I find the time.