"ERROR: No matching distribution found" in updating Pipfile.lock in installing a package from private Package Repository of GitLab.com
See original GitHub issueWhen we try to install a private package from our Package Repository of GitLab.com, we got the following error. (It worked in v2022.1.18. However, we got this error in v2022.3.23 and v2022.3.24.)
$ pipenv install mypackage20220329 -v --extra-index-url https://__token__:{my_secret_token}@gitlab.com/api/v4/projects/{my_project_no}/packages/pypi/simple
Installing mypackage20220329...
Installing package: mypackage20220329
Writing supplied requirement line to temporary file: 'mypackage20220329'
Installing 'mypackage20220329'
⠙ Installing mypackage20220329...$ /home/yasuda/.local/share/virtualenvs/20220329_test-EbHYGP4V/bin/python -m pip install --verbose --upgrade --exists-action=i -r /tmp/pipenv-u1u818u1-requirements/pipenv-ysi1um9s-requirement.txt -i https://__token__:{my_secret_token}@gitlab.com/api/v4/projects/{my_project_no}/packages/pypi/simple --extra-index-url https://pypi.org/simple
Using source directory: '/home/yasuda/.local/share/virtualenvs/20220329_test-EbHYGP4V/src'
Adding mypackage20220329 to Pipfile's [packages]...
✔ Installation Succeeded
Pipfile.lock (db4242) out of date, updating to (6b313a)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
Reporter.starting()
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.starting()
Reporter.adding_requirement(SpecifierRequirement('mypackage20220329'), None)
INFO:pipenv.patched.notpip._internal.resolution.resolvelib.reporter:Reporter.adding_requirement(SpecifierRequirement('mypackage20220329'), None)
CRITICAL:pipenv.patched.notpip._internal.resolution.resolvelib.factory:Could not find a version that satisfies the requirement mypackage20220329 (from versions: none)
Traceback (most recent call last):
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/resolvelib/resolvers.py", line 341, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
raise RequirementsConflicted(criterion)
pipenv.patched.notpip._vendor.resolvelib.resolvers.RequirementsConflicted: Requirements conflict: SpecifierRequirement('mypackage20220329')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
result = self._result = resolver.resolve(
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/resolvelib/resolvers.py", line 472, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/patched/notpip/_vendor/resolvelib/resolvers.py", line 343, in resolve
raise ResolutionImpossible(e.criterion.information)
pipenv.patched.notpip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('mypackage20220329'), parent=None)]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/utils.py", line 903, in resolve
results = resolver.resolve(self.constraints, check_supported_wheels=False)
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/resolution/resolvelib/resolver.py", line 103, in resolve
raise error from e
pipenv.patched.notpip._internal.exceptions.DistributionNotFound: No matching distribution found for mypackage20220329
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/resolver.py", line 766, in <module>
main()
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/resolver.py", line 760, in main
_main(parsed.pre, parsed.clear, parsed.verbose, parsed.system, parsed.write,
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/resolver.py", line 743, in _main
resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/resolver.py", line 704, in resolve_packages
results, resolver = resolve(
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/resolver.py", line 685, in resolve
return resolve_deps(
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/utils.py", line 1398, in resolve_deps
results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/utils.py", line 1127, in actually_resolve_deps
resolver.resolve()
File "/home/yasuda/.local/lib/python3.8/site-packages/pipenv/utils.py", line 905, in resolve
raise ResolutionFailure(message=str(e))
pipenv.exceptions.ResolutionFailure: ERROR: No matching distribution found for mypackage20220329
✘ Locking Failed!
My Pipfile is the following.
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
url = "https://__token__:{my_secret_token}@gitlab.com/api/v4/projects/{my_project_no}/packages/pypi/simple"
verify_ssl = true
name = "__token__:{my_secret_token}@gitlab"
[packages]
mypackage20220329 = "*"
[dev-packages]
[requires]
My Pipfile.lock is the following.
{
"_meta": {
"hash": {
"sha256": "7f7606f08e0544d8d012ef4d097dabdd6df6843a28793eb6551245d4b2db4242"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.8"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {},
"develop": {}
}
Our package “mypackage20220329” is uploaded at GitLab.com. We prepared the package by following the instruction at https://docs.gitlab.com/ee/user/packages/pypi_repository/ .
Note: We can’t reproduce the error if the package name is “mypypipackage”. It’s because “mypypipackage” is already on pypi. Therefore, we suspect that this error is caused by search at the wrong location in checking the existence of “mypackage20220329”.
- Expected location: https://__token__:{my_secret_token}@gitlab.com/api/v4/projects/{my_project_no}/packages/pypi/simple"
- Current location(Wrong): https://pypi.org/simple
Issue Analytics
- State:
- Created a year ago
- Comments:12
Top Results From Across the Web
Error with pip install from PyPI in self hosted Gitlab - General
ERROR : Could not find a version that satisfies the requirement unidecode ... (from versions: none) ERROR: No matching distribution found for ...
Read more >How to fix "No matching distribution found for {package name ...
I'm getting errors saying there is no distributions for the dependencies for my package and and error message saying that no version to...
Read more >Advanced Usage of Pipenv - Python Packaging Authority
pipenv install --pypi-mirror <mirror_url> $ pipenv update --pypi-mirror ... Or you can install packages exactly as specified in Pipfile.lock using the sync ...
Read more >#30913 (sagelib: Generate pyproject.toml and setup.cfg ...
(Adding pyproject.toml does not change how the Sage distribution installs ... The specific package versions are in the pipfile.lock file, which can be ......
Read more >pipenv · PyPI
When no parameters are passed to install , all packages [packages] ... update Runs lock, then sync. verify Verify the hash in Pipfile.lock...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have narrowed down the bug: It happened sometime after the “2022.1.8” version of Pipenv.
You can get a working, older version of Pipenv like this:
@matteius Thanks for the information! As long as it works fine, I think we are OK 😃