我已经在我的ubuntu18.04上安装了python3.7并尝试运行家庭助手测试用例,python和所有依赖项的安装成功,
所以在安装python3.7时,它内部安装了各种用于开发和测试python代码的包。其中一个包typing
是内部安装的。(从 python 3.5 开始默认添加打字)
在执行这些测试用例时,我遇到了一个错误。
File "/home/phil/repos/core/.tox/py38/lib/python3.8/site-packages/typing.py", line 1357, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/home/phil/repos/core/.tox/py38/lib/python3.8/site-packages/typing.py", line 1005, in __new__
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
----------------------------------------
ERROR: Command errored out with exit status 1: /home/phil/repos/core/.tox/py38/bin/python /home/phil/repos/core/.tox/py38/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-pqbbs22j/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
SO question 55833509上提供的一种解决方案是pip uninstall typing
,它也不起作用。
- 有没有办法我也可以卸载这个默认
typing
包? - 我们可以阻止安装这个
typing
包吗? 解决此问题的任何其他解决方案?