python - 使用 tox 执行家庭助理测试用例不起作用
问题描述
我已经在我的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
包吗? 解决此问题的任何其他解决方案?
解决方案
推荐阅读
- javascript - 使用内容恢复 GridstackJS 面板(例如 Highcharts)
- c# - 突然无法更改 HttpClient 上的超时
- javascript - 未捕获的语法错误:构建后出现意外的令牌“<”(Vue.js)
- android - 显示带有 recyclerview 和改造的图像
- ionic4 - 在 ionic 4 中网络离线时显示模式
- java - 如何拆分但不是所有字符
- php - 卷曲不启用 wamp
- python - 仅定义变量后无法访问对象宏中的变量(rivescript)
- symfony - Symfony 3:如何使用 Collection 并验证它
- javascript - 获取嵌套对象键作为连接字符串