-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any package requiring importlib-metadata breaks locking #4476
Comments
I'm encountering this too. A bit more information: this seems to happen when the upper bound is only set in the In the case of this Pipfile
However, with this file,
|
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
If you run
Now if you run When I pinned the following dependencies it didn't work at first when running
|
The sequence of calls causing this error are fairly elaborate.
If this search results in finding no version of the package installed, then there is no error. However, if there is only a version of the package that conflicts with virtualenv's requirements installed then the error discussed above is thrown. So to see this specific error you would likely need to fall under the following conditions:
Without fully understanding the logic of adding pipenv to the project environment, it is hard to know the right point at which to address this issue. However, it would seem that the dependency check for pipenv should use the version of python which will be used to run pipenv. Then an error would reflect a real problem, rather than the current situation. Alternatively, error handling around adding pipenv to the environment could handle VersionConflict errors. Either silently, which would assume that pipenv was correctly installed with its dependencies, but that might obviate the point of adding it to the environment. Or perhaps by installing required dependencies for pipenv for the project version of python. |
With |
@nicofuchsg if you're implying that simply running the latest version of I encountered this issue using |
If people go back and look at my notes it confirms that simply running cc: @nicofuchsg |
|
@DriverX, that doesn't work for me, unfortunately. The only thing that works is what I documented above. |
I found that my issue was actually just matter of updating to the newest
once that version was released and incorporated into my lockfiles everything worked like a charm on both python 3.7 and 3.8. |
The workaround of deleting the
Repeat runs of |
* Fixes version for `importlib-metadata` to a smaller version than 2.0 to avoid an error when deploying to clusters. See pypa/pipenv#4476 for more info. Co-Authored-by: Sébastien Délèze <[email protected]>
@scuerda, worked like a charm, thank you! |
This issue is fixed by the newest release of Any newcomers to this issue should upgrade the version of |
How about if we are using pip instead of virtualenv. |
With
Any suggestions on what we could do to avoid this? |
I only ran into this issue when I was using a pyenv miniconda version for my pipenv's python. No issues when I use a standard 3.8 pyenv installation. |
Following @scuerda comment it works for me to fix
|
I'm still having this issue trying to install tensorflow 1.15 with pip on OS X into a conda environment. I install a previous version of
EDIT: I've managed to install tensorflow 1.15 using conda. |
I wonder if there are plans for the |
I was using multiple versions of python on my system (3.8 as main, but also 3.7). So instead of upgrading pipenv as suggested above like this pip3 -U pipenv I upgraded pipenv for the version of python that was used by my project: python3.7 -m pip install -U pipenv |
- We added only the necessary packages in the Pipfile (there were more packages added there by mistake). We had to pin the flake8 package because of the following error when installing the packages: ERROR: Cannot install -r /home/user/dev/grades-report/dev-requirements.txt (line 6), -r /home/user/dev/grades-report/requirements.txt (line 2) and importlib-metadata==4.12.0 because these package versions have conflicting dependencies. This seems to be related to pypa/pipenv#4476. - Added an option in the Makefile to create the latest requirements files with the latest available package versions.
- We added only the necessary packages in the Pipfile (there were more packages added there by mistake). We had to pin the flake8 package because of the following error when installing the packages: ERROR: Cannot install -r /home/user/dev/grades-report/dev-requirements.txt (line 6), -r /home/user/dev/grades-report/requirements.txt (line 2) and importlib-metadata==4.12.0 because these package versions have conflicting dependencies. This seems to be related to pypa/pipenv#4476. - Added an option in the Makefile to create the latest requirements files with the latest available package versions.
Update README.md: Installation Guidelines 1. Added change to correct directory for installation 2. While running installation guideline for raw37 and py37, encountered this error: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. flake8 4.0.1 requires importlib-metadata<4.3; python_version < "3.8", but you have importlib-metadata 6.0.0 which is incompatible. flake8 4.0.1 requires mccabe<0.7.0,>=0.6.0, but you have mccabe 0.7.0 which is incompatible. This is discussed in a github issue: pypa/pipenv#4476 Added Fix : use command: pip install -U pipenv
The most recent version of
importlib-metadata
is 2.0.0. This is the version that gets resolved when any package is installed that requiredimportlib-metadata
without an upper bound. For example:flake8
.The
virtualenv
library requiresimportlib-metadata < 2.0
.When
project.get_environment()
is called the dependencies forvirtualenv
are compared to the working set resolved for the Pipfile dependencies and a VersonConflict error is raised.This is a very frustrating error because doing
pipenv lock -v
gives no indication of which package requires importlib-metadata < 2.0. Also inspectingpipenv graph
gives no indication either.A temporary fix would be to pin
importlib-metadata == "1.7.0"
in the Pipfile.The text was updated successfully, but these errors were encountered: