vendored version of six.py in pypi wheel breaks newer versions of pip
See original GitHub issueThe wheel that gets installed when you say pip install pysmt
replaces the global version of six:
$ python -c 'import six; print(six, six.__version__)'
<module 'six' from '/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/six.py'> 1.14.0
$ pip install pysmt
Collecting pysmt
Using cached PySMT-0.9.0-py2.py3-none-any.whl (317 kB)
Requirement already satisfied: six in /home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages (from pysmt) (1.14.0)
Installing collected packages: pysmt
Successfully installed pysmt-0.9.0
$ python -c 'import six; print(six, six.__version__)'
<module 'six' from '/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/six.py'> 1.10.0
This breaks newer versions of pypi, which depend on six>=1.11:
$ pip install sqlalchemy
Traceback (most recent call last):
File "/home/audrey/.virtualenvs/angr3/bin/pip", line 8, in <module>
sys.exit(main())
File "/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
module = importlib.import_module(module_path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 24, in <module>
from pip._internal.cli.req_command import RequirementCommand
File "/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 20, in <module>
from pip._internal.operations.prepare import RequirementPreparer
File "/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 16, in <module>
from pip._internal.distributions import (
File "/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/pip/_internal/distributions/__init__.py", line 2, in <module>
from pip._internal.distributions.wheel import WheelDistribution
File "/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/pip/_internal/distributions/wheel.py", line 5, in <module>
from pip._internal.utils.wheel import pkg_resources_distribution_for_wheel
File "/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/pip/_internal/utils/wheel.py", line 12, in <module>
from pip._vendor.six import PY2, ensure_str
ImportError: cannot import name 'ensure_str' from 'six' (/home/audrey/.virtualenvs/angr3/lib/python3.8/site-packages/six.py)
(it looks like there is an additional bug in that pip’s “vendored” import of six is in fact importing the global version, but that’s a problem for another day)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
`pip install --upgrade pip` breaks pip · Issue #26900 - GitHub
Following the instructions to brew python, I've upgraded pip and setuptools. After that, pip is broken because the pip binaries require the old...
Read more >How to install pip on Python 2.7 in 2021 - Stack Overflow
If you're running a version < 2.7.9 and you cannot upgrade to a newer version of Python then your only option is to...
Read more >Changelog - pip documentation v22.3.1
Fix a bug causing pip to not select a wheel compiled against an OSX SDK later than what Python itself was compiled against...
Read more >How to install, download and build Python wheels - ActiveState
Make sure Wheel and the latest version of setuptools is installed on your system by running: python -m pip install -U wheel setuptools...
Read more >pipenv Documentation - Read the Docs
Generates and checks file hashes for locked dependencies when installing from Pipfile.lock. • Automatically install required Python version when pyenv is ...
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
I published a stable version 0.9.5 that includes this fix.
Symptom for me was: