Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用tox不工作执行家庭助理测试用例_Python_Python 3.7_Tox_Home Assistant - Fatal编程技术网

Python 使用tox不工作执行家庭助理测试用例

Python 使用tox不工作执行家庭助理测试用例,python,python-3.7,tox,home-assistant,Python,Python 3.7,Tox,Home Assistant,我已经在我的ubuntu18.04上安装了python3.7,并尝试运行home assistant测试用例,成功安装了python和所有依赖项 因此,在安装python3.7之后,它会在内部安装各种用于开发和测试python代码的包。其中一个软件包是内部安装的键入。(自python 3.5以来,键入作为默认值添加) 在执行这些测试用例时,我面临一个错误 File "/home/phil/repos/core/.tox/py38/lib/python3.8/site-packages/

我已经在我的ubuntu18.04上安装了python3.7,并尝试运行home assistant测试用例,成功安装了python和所有依赖项

因此,在安装python3.7之后,它会在内部安装各种用于开发和测试python代码的包。其中一个软件包是内部安装的
键入
。(自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.
文件“/home/phil/repos/core/.tox/py38/lib/python3.8/site packages/typing.py”,第1357行,在
类可调用(extra=collections\u abc.Callable,metaclass=CallableMeta):
文件“/home/phil/repos/core/.tox/py38/lib/python3.8/site packages/typing.py”,第1005行,在新的__
self.\u abc\u registry=extra.\u abc\u registry
AttributeError:类型对象“Callable”没有属性“\u abc\u注册表”
----------------------------------------
错误:命令出错,退出状态为1:/home/phil/repos/core/.tox/py38/bin/python/home/phil/repos/core/.tox/py38/lib/python3.8/site-packages/pip安装--忽略已安装--无用户--前缀/tmp/pip-build-env-pqbbs22j/overlay--无警告脚本位置--无二进制:无:--仅二进制:无:-ihttps://pypi.org/simple -- “setuptools>=40.8.0”控制盘检查日志以获得完整的命令输出。
上提供的一个解决方案是
pip uninstall-typing
,它也不起作用。
  • 有什么方法可以卸载这个默认的
    打字
    软件包吗
  • 我们可以阻止安装此
    键入
    软件包吗
  • 是否有其他解决方案来解决此问题?

  • tox
    在虚拟环境中运行。因此,删除
    键入
    不会有帮助

    我假设您在克隆repo并安装系统后
    script/setup


    tox-r
    将重建环境

    谢谢你的帮助,但我已经这么做了,仍然面临同样的问题