Это ошибка, которую я получаю при запуске pip install requests
в Arch Linux:
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/pip/_internal/basecommand.py", line 141, in main
status = self.run(options, args)
File "/usr/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 248, in run
with self._build_session(options) as session:
File "/usr/lib/python3.7/site-packages/pip/_internal/basecommand.py", line 77, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/lib/python3.7/site-packages/pip/_internal/download.py", line 369, in __init__
max_retries=retries,
File "/usr/lib/python3.7/site-packages/cachecontrol/adapter.py", line 26, in __init__
super(CacheControlAdapter, self).__init__(*args, **kw)
TypeError: __init__() got an unexpected keyword argument 'max_retries'
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
load_entry_point('pip==18.0', 'console_scripts', 'pip')()
File "/usr/lib/python3.7/site-packages/pip/_internal/__init__.py", line 310, in main
return command.main(cmd_args)
File "/usr/lib/python3.7/site-packages/pip/_internal/basecommand.py", line 180, in main
timeout=min(5, options.timeout)
File "/usr/lib/python3.7/site-packages/pip/_internal/basecommand.py", line 77, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/lib/python3.7/site-packages/pip/_internal/download.py", line 369, in __init__
max_retries=retries,
File "/usr/lib/python3.7/site-packages/cachecontrol/adapter.py", line 26, in __init__
super(CacheControlAdapter, self).__init__(*args, **kw)
TypeError: __init__() got an unexpected keyword argument 'max_retries'```
Это выдает ту же ошибку при загрузке исходного кода и при запуске как sudo
.
Редактировать:
pip --version
выходов pip 18.0 from /usr/lib/python3.7/site-packages/pip (python 3.7)
Редактировать 2:
Мне удалось это исправить, удалив пакет arch python-pip
ипереустановите его, загрузив и запустив get-pip.py.