ImportError: cannot import name 'Type' when using Python 3.5.0
stanislaw opened this issue · comments
Stanislav Pankevich commented
Installing pip install scan-build
and running intercept-build
results in the following error:
$ intercept-build
Traceback (most recent call last):
File "/Users/Stanislaw/.pyenv/versions/3.5.0/bin/intercept-build", line 11, in <module>
load_entry_point('scan-build==2.0.11', 'console_scripts', 'intercept-build')()
File "/Users/Stanislaw/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/Stanislaw/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
return ep.load()
File "/Users/Stanislaw/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2445, in load
return self.resolve()
File "/Users/Stanislaw/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2451, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Users/Stanislaw/.pyenv/versions/3.5.0/lib/python3.5/site-packages/libscanbuild/intercept.py", line 39, in <module>
from libscanbuild.compilation import Compilation, CompilationDatabase
File "/Users/Stanislaw/.pyenv/versions/3.5.0/lib/python3.5/site-packages/libscanbuild/compilation.py", line 14, in <module>
from typing import List, Iterable, Dict, Tuple, Type, Any # noqa: ignore=F401
ImportError: cannot import name 'Type'
It is possible to get rid of this error by upgrading to Python 3.5.4 however it would be great if there either was a workaround for running scan-build with 3.5.0 or the >=3.5.4
could be reflected in the documentation.
This is how I learned that I should use 3.5.4: jupyter-notebook, ImportError: cannot import name 'Type'.
László Nagy commented
Thanks @stanislaw , I think it's fixed now. (Feel free to reopen it if not.)