Local wheel Installation failure due to path removal in Pipfile.lock
See original GitHub issueIssue description
This issue was introduced within the PR #5464 The lines:
if not keep_outdated:
try:
del lockfile[category]
except KeyError:
pass
forces the category to be resolved latter. This strips the path
key for local packages which does not get reintroduced into the lockfile later. This causes a cannot resolve package error
during installation despite Pipfile.lock being created.
i.e. the Pipfile.lock for the <LOCAL_PACKAGE>
loses the path.
"<LOCAL_PACKAGE>": {
"hashes": [
"sha256:<VALUE>"
],
"path": "<PATH>"
}
becomes
"<LOCAL_PACKAGE>": {
"hashes": [
"sha256:<VALUE>"
]
}
Expected result
Pipfile.lock should maintain the path
key for locally installed packages.
Actual result
[pipenv.exceptions.InstallError]: ERROR: Could not find a version that satisfies the requirement my-package (from versions: none)
[pipenv.exceptions.InstallError]: ERROR: No matching distribution found for my-package
Steps to replicate
- Create a Pipfile which contains a path to a local package. e.g.
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
my-package = {path = "./path/to/my-package.whl"}
- Run
pipenv install
$ pipenv --support
Pipenv version: '2022.11.30'
# NOTE: Tested around 2022.11.11 and 2022.11.5 to identify.
Pipenv location: '/usr/local/lib/python3.10/site-packages/pipenv'
Python location: '/usr/local/opt/python@3.10/bin/python3.10'
OS Name: 'posix'
User pip version: '22.3'
user Python installations found:
3.10.8
:/usr/local/bin/python3
3.9.16
:/usr/local/bin/python3.9
3.8.16
:/usr/local/bin/python3.8
Limited output…
Issue Analytics
- State:
- Created 9 months ago
- Comments:8
Top Results From Across the Web
Install local wheel package missing path in lock file #5479
In my program I use a local wheel, I'm in the process to upgrading from py 3.7 to py 3.11 and I had...
Read more >Common Pipenv Errors and How to Solve Them: Why Won't it ...
Locking Issue: Pipfile Contains a Reference to an Inexistent Package ... Pipfile won't lock when it tries to install packages that don't exist,...
Read more >pipenv Changelog - PyUp.io
- Pipenv will now correctly unqoute special characters in wheel URIs. - Fixed a bug with parsing and grouping old-style setup.py extras during...
Read more >pipenv Documentation - manpages.ubuntu!
The main commands are install, uninstall, and lock, which generates a Pipfile.lock. These are intended to replace $ pip install usage, as well...
Read more >How to fix locking failed in pipenv? - Stack Overflow
Try to remove Pipefile.lock before installing a package ... Just delete the Pipfile.lock then rerun pipenv 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
New version has been released so you can try it from pypi install.
There was a test scenario added for
file
but notpath
– we should probably add one forpath
as well: https://github.com/pypa/pipenv/pull/5523/files