You are not logged in.

#1 2021-06-23 13:50:53

annaoo
Member
Registered: 2021-06-23
Posts: 1

pip --version fails after system update:'InvalidSchemeCombination'

$ /usr/bin/pip --version
/home/user/.local/lib/python3.9/site-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.23) or chardet (4.0.0) doesn't match a supported version!
warnings.warn("urllib3 ({0}) or chardet ({1}) doesn't match a supported "
Traceback (most recent call last):
File "/usr/bin/pip", line 33, in <module>
sys.exit(load_entry_point('pip==20.3.4', 'console_scripts', 'pip')())
File "/usr/bin/pip", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 855, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3.9/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3.9/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python3.9/site-packages/pip/_internal/cli/cmdoptions.py", line 25, in <module>
from pip._internal.cli.progress_bars import BAR_TYPES
File "/usr/lib/python3.9/site-packages/pip/_internal/cli/progress_bars.py", line 12, in <module>
from pip._internal.utils.logging import get_indentation
File "/usr/lib/python3.9/site-packages/pip/_internal/utils/logging.py", line 18, in <module>
from pip._internal.utils.misc import ensure_dir
File "/usr/lib/python3.9/site-packages/pip/_internal/utils/misc.py", line 34, in <module>
from pip._internal.locations import get_major_minor_version, site_packages, user_site
File "/usr/lib/python3.9/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>
from . import _distutils, _sysconfig
File "/usr/lib/python3.9/site-packages/pip/_internal/locations/_sysconfig.py", line 8, in <module>
from pip._internal.exceptions import InvalidSchemeCombination, UserInstallationInvalid
ImportError: cannot import name 'InvalidSchemeCombination' from 'pip._internal.exceptions' (/usr/lib/python3.9/site-packages/pip/_internal/exceptions.py)

I have reviewed a similar issue: https://bbs.archlinux.org/viewtopic.php?pid=1979414
The resolution applied  in that issue is not applicable here though the errors are similar.

I have attempted to forcefully reinstall the os package python-pip and error still persists

One temporary workaround (that may cause issues when updating system in future so  beware) is installing pip from sources: https://pip.pypa.io/en/stable/installin … get-pip-py

Last edited by annaoo (2021-06-23 14:00:33)

Offline

#2 2021-06-23 14:57:59

loqs
Member
Registered: 2014-03-06
Posts: 13,701

Re: pip --version fails after system update:'InvalidSchemeCombination'

/home/user/.local/lib/python3.9/site-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.23) or chardet (4.0.0) doesn't match a supported version!

Have you tried removing the locally installed requests package?

Offline

Board footer

Powered by FluxBB