pipenv sync needs to be called twice to install all VCS dependencies
See original GitHub issueIssue description
I have a project that uses few dependencies that I install from a private Gitlab instance.
Project A requires Library X in its setup.py and mentions it solely by name.
Project B requires Project A.
The Pipfile of Project B contains and editable VCS dependency to Project A and Library X. When running pipenv sync
for the first time, the installation fails because Pipenv tries to resolve the dependencies from setup.py using pypi. After I execute pipenv sync
the second time, everything is installed as expected.
This problem does not occur, when I run pipenv sync --sequential
Expected result
VCS dependencies get resolved and installed.
Actual result
Not all VCS dependencies get resolved and installed.
Excerpt from pipenv sync --verbose
:
Collecting library-x (from project-a)
1 location(s) to search for versions of library-x:
* https://pypi.org/simple/library-x/
Getting page https://pypi.org/simple/library-x/
Looking up "https://pypi.org/simple/library-x/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/library-x/ HTTP/1.1" 404 13
Status code 404 not in (200, 203, 300, 301)
Could not fetch URL https://pypi.org/simple/library-x/: 404 Client Error: Not Found for url: https://pypi.org/simple/library-x/ - skipping
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-u9fp4m0k'
Exception information:
Traceback (most recent call last):
File "/home/username/.local/share/virtualenvs/project-b-DmiURb3f/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
status = self.run(options, args)
File "/home/username/.local/share/virtualenvs/project-b-DmiURb3f/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 318, in run
resolver.resolve(requirement_set)
File "/home/username/.local/share/virtualenvs/project-b-DmiURb3f/lib/python3.7/site-packages/pip/_internal/resolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)
File "/home/username/.local/share/virtualenvs/project-b-DmiURb3f/lib/python3.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/username/.local/share/virtualenvs/project-b-DmiURb3f/lib/python3.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
self.require_hashes
File "/home/username/.local/share/virtualenvs/project-b-DmiURb3f/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 218, in prepare_linked_requirement
req.populate_link(finder, upgrade_allowed, require_hashes)
File "/home/username/.local/share/virtualenvs/project-b-DmiURb3f/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 164, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/home/username/.local/share/virtualenvs/project-b-DmiURb3f/lib/python3.7/site-packages/pip/_internal/index.py", line 621, in find_requirement
'No matching distribution found for %s' % req
pip._internal.exceptions.DistributionNotFound: No matching distribution found for library-x (from project-a)
Steps to replicate
$ pipenv --rm
$ pipenv sync
$ pipenv sync
Sorry in advance for not pasting my Pipfile and the output of pipenv --support. Both contain quite a lot of auth-tokens that I don’t want to share and I am affraid to accidentally miss when redacting the output.
I might be able to recreate the problem with a few minimal github-repositories tomorrow.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
luckily I know for sure this is a regression that was released, (“luckily”), so no worries on reproducing. Thanks for the report
So far, I had no luck in reproducing the problem from scratch 😕. Will try again later.