-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Crashing with packaging.version.InvalidVersion: Invalid version: 'cpython'
#390
Comments
What I think is happening is that you have some package metadata that contains an invalid requirement string. More specifically, a requirement string that contains an invalid environment marker. I think the wrong marker variable is being used somewhere e.g. I was able to reproduce the same exact stack trace after adding the following METADATA file into my environment:
The stack trace:
It looks like the problem lies in Because of this, I think this maybe an upstream bug and should be reported here. |
Actually, it looks like this issue is already being tracked in pypa/packaging#767. |
packaging.version.InvalidVersion: Invalid version: 'cpython'
Thank you, do you think this could be somehow catched when evaluating the dependencies? Even if one package has bad definition in metadata it's maybe not reason to not show the partial tree of dependencies anyway. In my case I was looking what was requiring sklearn>=1.x.x, in the end I created an extra env in databricks and used the sklearn==0.23.x for loading of a model. |
Seeing that the upstream issue has been open for some time, I think it would make sense for me to implement a workaround until they are able to fix it. I'll get to it when I have the time. |
What pipdeptree version are you using?
2.23.0
Are you running pipdeptree in a virtual environment?
No
Describe the problem
When running
pipdeptree
in databricks notebook I am getting the following errorThe text was updated successfully, but these errors were encountered: