pipenv: Release v2023.6.26: error: invalid command 'egg_info'
Upgrading to pipenv
v2023.6.26 generates an error: invalid command 'egg_info'
in the CircleCI builds of our Django project.
pipenv
works as expected on local machines but fails on CircleCI until we pip install --upgrade "pipenv<2023.6.26
Expected result
pipenv builds without errors.
Actual result
Successfully installed pipenv-2023.6.26 setuptools-68.0.0
pipenv, version 2023.6.26
Creating a virtualenv for this project...
Pipfile: /home/circleci/circleci-workdir/Pipfile
Using /home/circleci/.pyenv/versions/3.9.17/bin/python3.9 (3.9.17) to create virtualenv...
created virtual environment CPython3.9.17.final.0-64 in 162ms
creator CPython3Posix(dest=/home/circleci/circleci-workdir/.venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/circleci/.local/share/virtualenv)
added seed packages: pip==23.1.2, setuptools==67.8.0, wheel==0.40.0
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Successfully created virtual environment!
Virtualenv location: /home/circleci/circleci-workdir/.venv
Installing dependencies from Pipfile.lock (ef2d1f)...
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'egg_info'
Exited with code exit status 1
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:
$ pipenv --support | pbcopy
If you’re on Windows, run the following:
> pipenv --support | clip
If you’re on Linux, run the following:
$ pipenv --support | xclip
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 15 (12 by maintainers)
@shinkawk I am guessing if you do a regular
pip install setuptools --upgrade
ahead of the test that python:3.9 and lower would actually succeed, but it highlights an implementation flaw in pipenv we want to address.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
setup_egg
command. Please have a try of this branch to see what I mean, for me it fixes the issue I was able to reproduce in my Ubuntu VM: https://github.com/pypa/pipenv/pull/5759The 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.
I plan to cut a release over the weekend after @oz123 has a chance to catch up with the latest merges.