-
-
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
Release v2023.6.26: error: invalid command 'egg_info' #5753
Comments
@cclauss can you please show you dependencies ? Do you have somewhere in the tree |
This was certainly caused by (unintentionally) the large refactor to requirementslib to migrate away from attrs to pydantic. It seems that you have some requirement that is going down the path of getting the metadata by calling |
I have a similar issue when locking this Pipfile. Any tips on how to help you debug the error? |
@juanitorduz that Pipfile will be gold for trying to figure it out -- know that this is a top priority bug for pipenv, but it will require some tinkering with requirementslib to get it nailed down. I'll try to find some time to triage further later this week, but if someone else wants to dig deeper, I think the strategy is: The easiest way to test a potential fix would be to modify requirementslib within pipenv and open a PR -- if all the tests in pipenv pass, there is a high probability the tests in requirementslib will pass also when the change is ported over the the main library there. |
Pipfile: |
@juanitorduz Try commenting out your line 90 and running again.
|
I was able to reproduce it briefly with an existing old virtualenv and just the Pipfile:
For some reason when I had pipenv create a new virtualenv, it did not get the egg_info issue. I then wasn't able to lock for a different reason which is equally odd, despite there being a regular release 2.12, I got:
So I noted those that it did find are pre releases, and I ran again: Noting also that in the issue report from @cclauss that it appears to be creating a fresh virtualenv but is getting the no egg_info command -- from what I can tell, python setup.py egg_info should be a valid command for the dependencies that are getting the error, they have a setup.py and use setuptools. |
I think I just figured out what is happening, and its not the simplest fix but let me explain. requirementslib basically is using the system python and not the virtualenv python -- I have a fix, but the problem is, requirementslib starts using pipenv mechanics to figure out the correct python to use. Your system python has a really old setuptools is my guess which doesn't have the The problem is, it opens the can of worms of what the heck is requirementslib, and why doesn't it just become part of pipenv. Or maybe it pushes us to have a better interface to pass in the right python to use within requirementslib, but yeah -- this is a great discovery of an issue and kind of a bummer. |
Hi @matteius
Just tested 2023.6.26 with Hope this helps! |
@shinkawk I am guessing if you do a regular |
A client with limited python experience spent two days trying to understand why their builds were failing. |
@intotecho The workaround should be to adjust the CI to |
Ok -- I thought of a potential workaround today and just tried it out; actually I tried it out earlier and it failed, started on the full on fix (which brought to light further how there is no parent model in requirementslib to track things and so adding python to every single class was proving time consuming) -- I stumbled across a line that was overriding the environment variable again to be |
There is an issue with the fix and the windows CI -- I am looking into it, probably a path specification difference. |
I plan to cut a release over the weekend after @oz123 has a chance to catch up with the latest merges. |
Upgrading to
pipenv
v2023.6.26 generates anerror: invalid command 'egg_info'
in the CircleCI builds of our Django project.pipenv
works as expected on local machines but fails on CircleCI until wepip install --upgrade "pipenv<2023.6.26
Expected result
pipenv builds without errors.
Actual result
When possible, provide the verbose output (
--verbose
), especially for locking and dependencies resolving issues.Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
Please run
$ pipenv --support
, and paste the results here. Don't put backticks (`
) around it! The output already contains Markdown formatting.If you're on macOS, run the following:
If you're on Windows, run the following:
If you're on Linux, run the following:
The text was updated successfully, but these errors were encountered: