我在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.
pip uninstall typing
,这也是不行的。typing
包也是?typing
包?