[BUG] KeyError: 'unix_user' with setuptools 60.0.0
See original GitHub issuesetuptools version
setuptools-60.0.0
Python version
Python 3.9
OS
Ubuntu 18.04
Additional environment information
No response
Description
Getting this error with setuptools 60.0.0
Traceback (most recent call last): File β<string>β, line 1, in <module> File β/tmpfs/src/github/jax/setup.pyβ, line 31, in <module> setup( File β/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/init.pyβ, line 153, in setup return distutils.core.setup(**attrs) File β/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/_distutils/core.pyβ, line 148, in setup return run_commands(dist) File β/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/_distutils/core.pyβ, line 163, in run_commands dist.run_commands() File β/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/_distutils/dist.pyβ, line 967, in run_commands self.run_command(cmd) File β/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/_distutils/dist.pyβ, line 985, in run_command cmd_obj.ensure_finalized() File β/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/_distutils/cmd.pyβ, line 107, in ensure_finalized self.finalize_options() File β/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/command/develop.pyβ, line 52, in finalize_options easy_install.finalize_options(self) File β/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/command/easy_install.pyβ, line 263, in finalize_options self._fix_install_dir_for_user_site() File β/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/command/easy_install.pyβ, line 375, in _fix_install_dir_for_user_site self.select_scheme(scheme_name) File β/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/command/easy_install.pyβ, line 716, in select_scheme scheme = INSTALL_SCHEMES[name] KeyError: βunix_userβ ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/local/bin/python3.9 -c βimport io, os, sys, setuptools, tokenize; sys.argv[0] = β"β"β/tmpfs/src/github/jax/setup.pyββ'ββ; file=ββ'ββ/tmpfs/src/github/jax/setup.pyββ'ββ;f = getattr(tokenize, β"βββopenβββββ, open)(file) if os.path.exists(file) else io.StringIO(βββββfrom setuptools import setup; setup()βββββ);code = f.read().replace(βββ"β\r\nββ'ββ, β"β"β\nββ'ββ);f.close();exec(compile(code, file, β"βββexecβββ"β))β develop --no-deps --user --prefix= Check the logs for full command output.
Expected behavior
The Error should not happen. It was working fine with setuptools 59.8.0
How to Reproduce
git clone https://github.com/google/jax.git
cd jax
python3.9 -m pip install -e .
Make sure the setuptools version in 60.0.0
Output
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmpfs/src/github/jax/setup.py", line 31, in <module>
setup(
File "/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 985, in run_command
cmd_obj.ensure_finalized()
File "/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/command/develop.py", line 52, in finalize_options
easy_install.finalize_options(self)
File "/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/command/easy_install.py", line 263, in finalize_options
self._fix_install_dir_for_user_site()
File "/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/command/easy_install.py", line 375, in _fix_install_dir_for_user_site
self.select_scheme(scheme_name)
File "/home/kbuilder/.local/lib/python3.9/site-packages/setuptools/command/easy_install.py", line 716, in select_scheme
scheme = INSTALL_SCHEMES[name]
KeyError: 'unix_user'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmpfs/src/github/jax/setup.py'"'"'; __file__='"'"'/tmpfs/src/github/jax/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.
Code of Conduct
- I agree to follow the PSF Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (7 by maintainers)
Top GitHub Comments
I still have this problem on Ubuntu 22.04 with Python 3.10 and setuptools 63.2.0 installed. Is that normal?
Edit: I tried a lot of different versions of setuptools: 59,60,61,63 and none works. It works when using
python3 setup.py develop --user
instead ofpython3 -m pip install --user --editable
.Note that I also have to use the
site.ENABLE_USER_SITE = "--user" in sys.argv[1:]
workaround described in this pip issue. It seems to me like installing a development version becomes increasingly impossible.it always working correctly in
venv
in my systemas for it will remove
python3-pip
when purgingpython3-setuptools
, Iβve tried some weird way to solve it, and it works in dockerdocker ubuntu version: ubuntu@sha256:20fa2d7bb4de7723f542be5923b06c4d704370f0390e4ae9e1c833c8785644c1