#jupyter-notebook #ipython #jupyter #jupyter-contrib-nbextensions
#jupyter-ноутбук #ipython #jupyter #jupyter-contrib-nbextensions
Вопрос:
Некоторое время назад я установил beakerx
, и обновление прервало установку. Каждый раз, когда я запускаю IPython, отображается предупреждение. Как я могу чисто избавиться от расширения и этого вывода?
[IPKernelApp] WARNING | Error in loading extension: beakerx.autotranslation
Check your config files in /Users/cls/.ipython/profile_default
Traceback (most recent call last):
File "/Users/cls/anaconda3/lib/python3.6/site-packages/IPython/core/shellapp.py", line 261, in init_extensions
self.shell.extension_manager.load_extension(ext)
File "/Users/cls/anaconda3/lib/python3.6/site-packages/IPython/core/extensions.py", line 80, in load_extension
mod = import_module(module_str)
File "/Users/cls/anaconda3/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'beakerx'
[IPKernelApp] WARNING | Error in loading extension: beakerx_magics.kernel_magic
Check your config files in /Users/cls/.ipython/profile_default
Traceback (most recent call last):
File "/Users/cls/anaconda3/lib/python3.6/site-packages/IPython/core/shellapp.py", line 261, in init_extensions
self.shell.extension_manager.load_extension(ext)
File "/Users/cls/anaconda3/lib/python3.6/site-packages/IPython/core/extensions.py", line 80, in load_extension
mod = import_module(module_str)
File "/Users/cls/anaconda3/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'beakerx_magics'
Ответ №1:
Следуя инструкциям по удалению, я запустил grep -r beakerx *
корневой каталог моего virtualenv и обнаружил следующий мусор:
etc/jupyter/jupyter_notebook_config.json: "beakerx": false
etc/ipython/ipython_config.py:c.InteractiveShellApp.extensions = ['beakerx.autotranslation',
etc/ipython/ipython_config.py:'beakerx_magics.kernel_magic',
etc/ipython/ipython_config.py:'beakerx_magics.groovy_magic',
etc/ipython/ipython_config.py:'beakerx_magics.clojure_magic',
etc/ipython/ipython_config.py:'beakerx_magics.kotlin_magic',
etc/ipython/ipython_config.py:'beakerx_magics.scala_magic',
etc/ipython/ipython_config.py:'beakerx_magics.sql_magic',
etc/ipython/ipython_config.py:'beakerx_magics.java_magic'
Я удалил оскорбительные строки из вышеупомянутых файлов, и сообщения об ошибках исчезли.
Для ipython_config.py
c = get_config()
c.InteractiveShellApp.extensions = [
]
Для jupyter_notebook_config.json
{
"NotebookApp": {
"nbserver_extensions": {
}
},
"KernelSpecManager": {}
}