Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
369 views
in Technique[技术] by (71.8m points)

python - AttributeError: type object 'Callable' has no attribute '_abc_registry'

When I open my jupyter notebook I get errors.

I use google for help, but I can't find an answer.

I'm on macOS mojave and using python 3.7.2.I reinstalled my Jupiter notebook but no change.

When I input jupyter notebook. It show me these

Last login: Wed Apr 24 23:06:17
miracleleon@MiracledeMBP  ~  jupyter notebook
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 6, in 
from notebook.notebookapp import main
File "/usr/local/lib/python3.7/site-packages/notebook/init.py", line 25, in 
from .nbextensions import install_nbextension
File "/usr/local/lib/python3.7/site-packages/notebook/nbextensions.py", line 610, in 
from .extensions import (
File "/usr/local/lib/python3.7/site-packages/notebook/extensions.py", line 8, in 
from tornado.log import LogFormatter
File "/usr/local/lib/python3.7/site-packages/tornado/log.py", line 34, in 
from tornado.escape import _unicode
File "/usr/local/lib/python3.7/site-packages/tornado/escape.py", line 27, in 
from tornado.util import unicode_type
File "/usr/local/lib/python3.7/site-packages/tornado/util.py", line 18, in 
import typing
File "/usr/local/lib/python3.7/site-packages/typing.py", line 1356, in 
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/usr/local/lib/python3.7/site-packages/typing.py", line 1004, in new
self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
question from:https://stackoverflow.com/questions/65837577/getting-this-error-while-installing-pyautogui

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try uninstalling typing:

pip uninstall typing

or downgrading python to 3.6. There seems to be a problem with typing in 3.7

If after that you get:

AttributeError: module 'typing' has no attribute '_ClassVar'

try pip uninstall dataclasses.

For more info refer to: https://github.com/RTIInternational/gobbli/issues/10


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...