ImportError: cannot import name '_GenericAlias' from 'typing' #138
Closed
by dnbo opened 4 years ago
·
5 comments
Loading…
Reference in new issue
There is no content yet.
Delete Branch '%!s(MISSING)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Cloned the repository, ran
pip3 install --user .
and then tried to run it using Python 3.7 and got the following error:Run on Mac OSX 10.15.16.
Something incompatible with 3.7?
probably need to update to a new version of cattr, testing it out
I couldn't reproduce using 3.7.0, which version of cattrs are you using?
pip show cattrs-3.8
I might also just switch back to mainline cattrs since it sounds like it will finally work with 3.9 soon. https://github.com/Tinche/cattrs/issues/100 This was the reason I switched to a fork in the first place.
Also, try it using the virtualenv method.
this should work, since it's using the exact versions I am
What is strange, is that the
typing
module contains_GenericAlias
in the source code for 3.7, so it should work regardless of what other versions of things you have installed. See https://github.com/python/cpython/blob/3.7/Lib/typing.py#L599. It might be that it's actually missing in your specific version, so updating to a later version of 3.7 might fix the problem...This did it for me. Strange, because I thought this was what I was doing, but perhaps not.
pip show cattrs-3.8
returned0.9.1
for me for the record.