as the title said, I get the error AttributeError: type object 'Callable' has no attribute '_abc_registry' with pip. In particular, i've seen the question AttributeError: type object 'Callable' has no attribute '_abc_registry' but the only answer does not work for me. In fact, i get:
> pip uninstall typing
Traceback (most recent call last):
File "/home/user/.local/bin/pip3", line 5, in <module>
from pip._internal.cli.main import main
File "/home/user/.local/lib/python3.7/site-packages/pip/__init__.py", line 1, in <module>
from typing import List, Optional
File "/home/user/.local/lib/python3.7/site-packages/typing.py", line 1359, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/home/user/.local/lib/python3.7/site-packages/typing.py", line 1007, in __new__
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry
So I've tried to downgrade pip, but i still get the same error
> python3 -m pip install pip==20.0.2
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/home/user/.local/lib/python3.7/site-packages/pip/__init__.py", line 1, in <module>
from typing import List, Optional
File "/home/user/.local/lib/python3.7/site-packages/typing.py", line 1359, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/home/user/.local/lib/python3.7/site-packages/typing.py", line 1007, in __new__
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
Same error when i ask for the pip version:
> pip --version
Traceback (most recent call last):
File "/home/user/.local/bin/pip", line 5, in <module>
from pip._internal.cli.main import main
File "/home/user/.local/lib/python3.7/site-packages/pip/__init__.py", line 1, in <module>
from typing import List, Optional
File "/home/damiano/.local/lib/python3.7/site-packages/typing.py", line 1359, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/home/user/.local/lib/python3.7/site-packages/typing.py", line 1007, in __new__
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
In general, the whole pip seems broken. Even when i only type pip in the terminal I get the same error. Is there a way out?
Thanks