Open seitzbg opened 6 years ago
Related to this, I'm unable to get this installed with python 3.9 without a lot of pain. I tried to use a venv
to workaround the conflict, but another issue is the that use_2to3
is no longer supported by python setuptools, as per https://setuptools.pypa.io/en/latest/history.html#v58-0-0.
To reproduce (assuming a local / alternate version of python3.9 is installed):
python3.9 -m pip install --user virtualenv
python3.9 -m pip install --user virtualenvwrapper
export VIRTUALENVWRAPPER_PYTHON="$(which python3.9)"
source "$(which virtualenvwrapper.sh)"
mkvirtualenv jmespath-terminal
pip install jmespath-terminal
The main issue in the pip output is:
Collecting urwid==1.2.2
Using cached urwid-1.2.2.tar.gz (585 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
...
distutils.errors.DistutilsSetupError: use_2to3 is invalid.
...
SystemExit: error in urwid setup command: use_2to3 is invalid.
error in urwid setup command: use_2to3 is invalid.
Far from ideal workaround:
pip install 'setuptools<58'
pip install jmespath-terminal
Facing the same issue when installing jmespath-terminal
on the latest Python docker image:
> docker run -it --rm python:3.10.2-alpine3.15 sh
/ # pip install jmespath-terminal
Collecting jmespath-terminal
Downloading jmespath-terminal-0.2.1.tar.gz (6.3 kB)
Collecting jmespath<=1.0.0,>=0.4.1
Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting Pygments<3.0,>=2.0
Downloading Pygments-2.11.2-py3-none-any.whl (1.1 MB)
|████████████████████████████████| 1.1 MB 1.2 MB/s
Collecting urwid==1.2.2
Downloading urwid-1.2.2.tar.gz (585 kB)
|████████████████████████████████| 585 kB 16.2 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8igz9nr4/urwid_75d8c0b6e14147f585031e077af5bfd0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8igz9nr4/urwid_75d8c0b6e14147f585031e077af5bfd0/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'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-54g_o1ge
cwd: /tmp/pip-install-8igz9nr4/urwid_75d8c0b6e14147f585031e077af5bfd0/
Complete output (27 lines):
Traceback (most recent call last):
File "/usr/local/lib/python3.10/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 453, in __init__
_Distribution.__init__(
File "/usr/local/lib/python3.10/distutils/dist.py", line 292, in __init__
self.finalize_options()
File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 831, in finalize_options
ep(self)
File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 852, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 296, in invalid_unless_false
raise DistutilsSetupError(f"{attr} is invalid.")
distutils.errors.DistutilsSetupError: use_2to3 is invalid.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-8igz9nr4/urwid_75d8c0b6e14147f585031e077af5bfd0/setup.py", line 85, in <module>
setup(**setup_d)
File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.10/distutils/core.py", line 113, in setup
raise SystemExit("error in %s setup command: %s" % \
SystemExit: error in urwid setup command: use_2to3 is invalid.
error in urwid setup command: use_2to3 is invalid.
Couldn't build the extension module, trying without it...
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/0c/6a/c6eceee1b52004d791b1249d798e3a6ef280a8ab5645b5e5246e8e73c7cb/urwid-1.2.2.tar.gz#sha256=e122e2dee122314f5626945af4dbe15bf3de9f318c552a4c0b68c1c480852d92 (from https://pypi.org/simple/urwid/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Collecting jmespath-terminal
Downloading jmespath-terminal-0.2.0.tar.gz (6.2 kB)
Collecting Pygments<=2.0,>=1.6
Downloading Pygments-2.0-py3-none-any.whl (672 kB)
|████████████████████████████████| 672 kB 12.3 MB/s
Collecting jmespath-terminal
Downloading jmespath-terminal-0.1.1.tar.gz (5.1 kB)
Downloading jmespath-terminal-0.1.0.tar.gz (3.8 kB)
Downloading jmespath-terminal-0.0.1.tar.gz (3.4 kB)
ERROR: Cannot install jmespath-terminal==0.0.1, jmespath-terminal==0.1.0, jmespath-terminal==0.1.1, jmespath-terminal==0.2.0 and jmespath-terminal==0.2.1 because these package versions have conflicting dependencies.
The conflict is caused by:
jmespath-terminal 0.2.1 depends on urwid==1.2.2
jmespath-terminal 0.2.0 depends on urwid==1.2.2
jmespath-terminal 0.1.1 depends on urwid==1.2.2
jmespath-terminal 0.1.0 depends on urwid==1.2.2
jmespath-terminal 0.0.1 depends on urwid==1.2.2
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
This issue is because of the breaking changes introduced in setuptools==58
dropped the support of 2to3.
Reference: pypa/setuptools#2086
Temporary solution:
pip3 install --upgrade setuptools==57
Then:
pip3 install jmespath-terminal
Bumping #26.
This issue is because of the breaking changes introduced in
setuptools==58
dropped the support of 2to3.Reference: pypa/setuptools#2086
Temporary solution:
pip3 install --upgrade setuptools==57
Tried this and still getting the error:
pyenv virtualenv 3.12.1 jmespath
pyenv activate jmespath-terminal
pip3 install --upgrade setuptools==57
pip list
# setuptools 57.0.0
pip3 install jmespath-terminal
same error.
Try using the fork?
Is it possible this can be bumped to use the latest urwid? 2.0.1 ?
TIA!