pip install -e fails on version 50: command class <class 'setuptools.command.egg_info.egg_info'> must subclass Command
See original GitHub issue> pip install -e .
ERROR: Command errored out with exit status 1:
command: /Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/jaykarimi/Documents/vanir/setup.py'"'"'; __file__='"'"'/Users/jaykarimi/Documents/vanir/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
cwd: /Users/jaykarimi/Documents/vanir/
Complete output (19 lines):
/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/dist.py:452: UserWarning: Normalizing 'v1.7.1' to '1.7.1'
warnings.warn(tmpl.format(**locals()))
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/jaykarimi/Documents/vanir/setup.py", line 127, in <module>
setup(**_conf)
File "/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/_distutils/core.py", line 134, in setup
ok = dist.parse_command_line()
File "/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/_distutils/dist.py", line 484, in parse_command_line
args = self._parse_command_opts(parser, args)
File "/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/dist.py", line 903, in _parse_command_opts
nargs = _Distribution._parse_command_opts(self, parser, args)
File "/Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/lib/python3.6/site-packages/setuptools/_distutils/dist.py", line 548, in _parse_command_opts
"command class %s must subclass Command" % cmd_class)
distutils.errors.DistutilsClassError: command class <class 'setuptools.command.egg_info.egg_info'> must subclass Command
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Python pip install fails: invalid command egg_info
I found a reference online that one has to use "python2 setup.py install" from the download directory, and indeed find that this will...
Read more >setuptools 10.0 - PyPI
Easily download, build, install, upgrade, and uninstall Python packages.
Read more >Command python setup py egg info failed with error code 1 in ...
Hi Guys, I am trying to install jupyter in my Windows system, but It shows me the below error ... \AppData\Local\Temp\ How can...
Read more >Good Integration Practices β pytest documentation
Install package with pipΒΆ. For development, we recommend you use venv for virtual environments and pip for installing your application and any dependencies,Β ......
Read more >Running setuptools commands - Python Packaging Authority
Historically, setuptools allowed running commands via a setup.py script at the ... pip install build # needs to be installed first python -m...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This can be worked around with the SETUPTOOLS_USE_DISTUTILS env var. https://setuptools.readthedocs.io/en/latest/history.html#v50-0-0
I had this problem with
ruamel.yaml.clib
, but only when installing from source (not wheels).Reproducer:
pip install --force-reinstall --ignore-installed --no-binary :all: ruamel.yaml.clib
Workaround
export SETUPTOOLS_USE_DISTUTILS="stdlib"
pip install --force-reinstall --ignore-installed --no-binary :all: ruamel.yaml.clib
@asmacdo I can confirm that the workaround you describe with
export SETUPTOOLS_USE_DISTUTILS="stdlib"
seems to resolve the error I am seeing as well.