-vvv option).While I see a bunch of new issues for export, I don't see anything specifically for this one, and want to make sure it doesn't get missed.
poetry export for poetry 1.1.2 uses an invalid/deprecated format for local file dependencies, however poetry 1.0.10 does not.
Specifically, it uses the package @ path/to/local/file.whl format, which does not work for pip 20.0.1 or later. Notably, the format did not cause an error when 19.2.3 was installed.
I noticed this bug after updating poetry from 1.0.10 to 1.1.2. Our build process builds a Docker image that pip installs the exported requirements file.
$ poetry new example
$ cd example/
$ mkdir third_party
$ pip3 wheel --no-deps -w third_party black
$ poetry add third_party/black-20.8b1-py3-none-any.whl
$ poetry export -o requirements.txt
$ poetry shell
$ python -m pip install -U pip==20.* # for the purpose of the demo
$ pip3 install -r requirements.txt
ERROR: Invalid requirement: 'black @ third_party/black-20.8b1-py3-none-any.whl' (from line 4 of requirements.txt)
Hint: It looks like a path. File 'black @ third_party/black-20.8b1-py3-none-any.whl' does not exist.
Copy-paste-friendly version of steps (no $ or output)
poetry new example
cd example/
mkdir third_party
pip3 wheel --no-deps -w third_party black
poetry add third_party/black-20.8b1-py3-none-any.whl
poetry export -o requirements.txt
poetry shell
python -m pip install -U pip==20.*
pip3 install -r requirements.txt
...
black @ third_party/black-20.8b1-py3-none-any.whl \
--hash=sha256:c0b742cfc8d6f607729d222b90bf3280e2c1332692b3b2520e7da259a5f4f609
...
...
third_party/black-20.8b1-py3-none-any.whl \
--hash=sha256:c0b742cfc8d6f607729d222b90bf3280e2c1332692b3b2520e7da259a5f4f609
...
...
black @ file:///third_party/black-20.8b1-py3-none-any.whl \
--hash=sha256:c0b742cfc8d6f607729d222b90bf3280e2c1332692b3b2520e7da259a5f4f609
...
Hi. I'm having a very similar issue. According to this PEP 440, the format is right, but when running the command of pip install, it can't find the path correctly. Maybe is missing the file:/// notation?
@eduardofb That seems to be the issue, manually adding file:/// to the front of the path solves it
Most helpful comment
@eduardofb That seems to be the issue, manually adding
file:///to the front of the path solves it