pip fails to install remote dependency when it is a .whl and follows PEP 440 · Issue #6202 · pypa/pip (original) (raw)
Environment
- pip version:
pip 18.1
- Python version:
Python 2.7.12
- OS:
Ubuntu 16.04.1 - Linux 4.15.0-42-generic
I'm using virtualenv
on the version 15.2.0
Description
When following PEP 508 and PEP 440's direct references and adding a dependency to a file, say requirements.txt
like this:
boto @ https://files.pythonhosted.org/packages/23/10/c0b78c27298029e4454a472a1919bde20cb182dab1662cec7f2ca1dcc523/boto-2.49.0-py2.py3-none-any.whl
doing a pip install -r requirements.txt
gives this error.
Requirement u'boto @ git+https://files.pythonhosted.org/packages/23/10/c0b78c27298029e4454a472a1919bde20cb182dab1662cec7f2ca1dcc523/boto-2.49.0-py2.py3-none-any.whl' looks like a filename, but the file does not exist
Processing ./boto @ git+https:/files.pythonhosted.org/packages/23/10/c0b78c27298029e4454a472a1919bde20cb182dab1662cec7f2ca1dcc523/boto-2.49.0-py2.py3-none-any.whl
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/vinicyusmacedo/Documents/Development/myapp/boto @ git+https:/files.pythonhosted.org/packages/23/10/c0b78c27298029e4454a472a1919bde20cb182dab1662cec7f2ca1dcc523/boto-2.49.0-py2.py3-none-any.whl'
Expected behavior
Pip should download and install the dependency.
pip install -r tests.txt
Collecting boto@ https://files.pythonhosted.org/packages/23/10/c0b78c27298029e4454a472a1919bde20cb182dab1662cec7f2ca1dcc523/boto-2.49.0-py2.py3-none-any.whl# from https://files.pythonhosted.org/packages/23/10/c0b78c27298029e4454a472a1919bde20cb182dab1662cec7f2ca1dcc523/boto-2.49.0-py2.py3-none-any.whl# (from -r tests.txt (line 1))
Using cached https://files.pythonhosted.org/packages/23/10/c0b78c27298029e4454a472a1919bde20cb182dab1662cec7f2ca1dcc523/boto-2.49.0-py2.py3-none-any.whl
Installing collected packages: boto
Successfully installed boto-2.49.0
Note that including a #
to the end of the URL works just fine.
How to Reproduce
- Create a file (say
requirements.txt
) with some URLs to remote .whl files following PEP 440's direct references - Run
pip install -r requirements.txt
- An error occurs.