18π
Here are my debugging notes. Still not sure which package is causing the problem, but this does seem to fix it.
The error you get when you first run pipenv install
with pipenv version 2020.8.13
.
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/cli/command.py", line 252, in install
site_packages=state.site_packages
File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 1928, in do_install
site_packages=site_packages,
File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 580, in ensure_project
pypi_mirror=pypi_mirror,
File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 512, in ensure_virtualenv
python=python, site_packages=site_packages, pypi_mirror=pypi_mirror
File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 999, in do_create_virtualenv
project._environment.add_dist("pipenv")
File "/usr/local/lib/python3.6/site-packages/pipenv/environment.py", line 135, in add_dist
self.extend_dists(dist)
File "/usr/local/lib/python3.6/site-packages/pipenv/environment.py", line 127, in extend_dists
extras = self.resolve_dist(dist, self.base_working_set)
File "/usr/local/lib/python3.6/site-packages/pipenv/environment.py", line 122, in resolve_dist
deps |= cls.resolve_dist(dist, working_set)
File "/usr/local/lib/python3.6/site-packages/pipenv/environment.py", line 121, in resolve_dist
dist = working_set.find(req)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 642, in find
raise VersionConflict(dist, req)
pkg_resources.VersionConflict: (importlib-metadata 2.0.0 (/usr/local/lib/python3.6/site-packages), Requirement.parse('importlib-metadata<2,>=0.12; python_version < "3.8"'))
If you run pip install -U pipenv
it seems to change the importlib-metadata
version:
Installing collected packages: importlib-metadata
Attempting uninstall: importlib-metadata
Found existing installation: importlib-metadata 2.0.0
Uninstalling importlib-metadata-2.0.0:
Successfully uninstalled importlib-metadata-2.0.0
Successfully installed importlib-metadata-1.7.0
Now if you run pipenv install -d --skip-lock
it will finish. It seems like a library is requiring a version >= importlib-metadata 2.0
.
When I pinned the following dependencies it didnβt work at first when running pipenv lock
, however, if I removed the lock file (rm Pipenv.lock
) then it worked when I ran pipenv lock
again.
virtualenv = "==20.0.31"
importlib-metadata = "==1.7.0"
- [Django]-Change a field in a Django REST Framework ModelSerializer based on the request type?
- [Django]-Django.db.migrations.exceptions.InconsistentMigrationHistory
- [Django]-When to use Django get_absolute_url() method?
0π
I had the same problem when creating a virtual environment using python 3.7.12. The problem is gone using python 3.8.10. On Ubuntu 20.04.4 LTS.
- [Django]-No URL to redirect to. Either provide a url or define a get_absolute_url method on the Model
- [Django]-Is there a reliable python library for taking a BibTex entry and outputting it into specific formats?
- [Django]-Sphinx automodule: how to reference classes in same module?
0π
β Delete the Pipfile in your project
β run $pipenv lock
This should work. Before deleting you might also try
$pipenv lock βpre
- [Django]-What is doing __str__ function in Django?
- [Django]-Django : get_or_create Raises duplicate entry with together_unique
- [Django]-Django β set user permissions when user is automatically created using get_or_create
-1π
Here are some steps we followed, while we faced "locking failed"
1.make env
2.source /etc/pyenv
3.pipenv install
4.pipenv graph
5. Shoot the respective testcase execution (it may vary based on requirements)
Hope it works!!!:)
- [Django]-Adding css class to field on validation error in django
- [Django]-Permission Denied error with Django while uploading a file
- [Django]-Why does Django make migrations for help_text and verbose_name changes?
- [Django]-Django display message after POST form submit
- [Django]-Django Model β Get distinct value list
- [Django]-How to get the domain name of my site within a Django template?