2

I have installed python3.7 on my ubuntu18.04 and trying to run home assistant test cases , The installation of python and all dependencies was successfully,

So upon installing python3.7, It internally install various packages for development and test python code. one of the package is typing which is internally installed. (typing is added as default since python 3.5)

On executing these test cases I am facing an error.

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.

One solution provided on SO question 55833509 is pip uninstall typing, which is also not working.

  1. Is there a way I can uninstall this default typing package as well?
  2. Can we prevent install this typing package?
  3. Any Other solution to fix this issue?

Community
  • 1
  • 1
Shivam Seth
  • 677
  • 1
  • 8
  • 21
  • @mariusz, No .. sadly we chose not to continue with home-assistant ... If you find the solution kindly post and help others. – Shivam Seth May 16 '23 at 12:18

1 Answers1

1

tox is run in a virtual environment. Thus, removing typing will not help.

I assume that you script/setup after you cloned the repos and you have the system's dependencies installed.

tox -r would rebuild the environment then.