use*_*934 6 python jupyter jupyter-notebook
我正在将Macbook与OS Sierra一起使用,并运行Python 3.6.1和Jupyter Notebook Server 5.0.0,按照https://github.com/ipython-contrib/jupyter_contrib_nbextensions上的说明安装了Jupyter Notebook扩展
尽管笔记本在我的系统上可以正常工作,但我无法查看nbextensions选项卡。以下是我jupyter notebook在终端上运行时看到的错误日志。我已经在此处看到一些相关问题,但它们似乎与安装特定扩展有关。
此外,似乎建议使用一种解决方案pip install jupyter_nbextensions_configurator,但是从下面的输出可以看出,我已经安装了扩展程序。
Requirement already satisfied: traitlets in /usr/local/lib/python3.6/site-packages (from jupyter_nbextensions_configurator)
Requirement already satisfied: tornado in /usr/local/lib/python3.6/site-packages (from jupyter_nbextensions_configurator)
Run Code Online (Sandbox Code Playgroud)
但是,在日志中,您会注意到这ModuleNotFoundError: No module named 'jupyter_nbextensions_configurator'是错误消息之一。
[W 08:44:49.973 NotebookApp] server_extensions is deprecated, use nbserver_extensions
[W 08:44:50.146 NotebookApp] Error loading server extension jupyter_nbextensions_configurator
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/notebook/notebookapp.py", line 1271, in init_server_extensions
mod = importlib.import_module(modulename)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'jupyter_nbextensions_configurator'
[I 08:44:50.158 NotebookApp] Serving notebooks from local directory: /Users/sp
[I 08:44:50.158 NotebookApp] 0 active kernels
[I 08:44:50.158 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=c777a7ab5dc6cf416c238b7b37f58d10ebea9db0743b46ae
[I 08:44:50.158 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 08:44:50.163 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=c777a7ab5dc6cf416c238b7b37f58d10ebea9db0743b46ae
[I 08:44:51.633 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[W 08:44:54.407 NotebookApp] 404 GET /nbextensions/nbextensions_configurator/tree_tab/main.js?v=20170511084449 (::1) 25.76ms referer=http://localhost:8888/tree
Run Code Online (Sandbox Code Playgroud)
我在这里想念什么?谢谢!
inv*_*tus 17
我有同样的问题。这是我解决它的方法。
我已经下载了 Anaconda python 3.7 版。我的系统上已经安装了 Python 3.6.7。
如果我这样做,我会得到这个错误:
pip install jupyter_contrib_nbextensions
Run Code Online (Sandbox Code Playgroud)
为了解决它,我做了:
python3.7 -m pip install jupyter_contrib_nbextensions
Run Code Online (Sandbox Code Playgroud)
我还没有尝试过,但这也可以解决您的问题:
conda install -c conda-forge jupyter_nbextensions_configurator
Run Code Online (Sandbox Code Playgroud)
所以我猜这个问题是因为你的系统上有多个版本的 Python。Anaconda 使用的和“普通 pip”使用的可能不同。
我通过删除 jupyter-notebook、jupyter_contrib_nbextensions 和 jupyter_nbextensions_configurator 并从头开始解决了这个问题。
注意:它仅适用于 Anaconda 环境。
对于不同的安装源,您可以通过以下方式删除这些包:
pip uninstall jupyter
pip uninstall jupyter_contrib_nbextensions
pip uninstall jupyter_nbextensions_configurator
Run Code Online (Sandbox Code Playgroud)
或者
conda remove --force jupyter notebook
conda remove --force jupyter_nbextensions_configurator
conda remove --force jupyter_contrib_nbextensions
Run Code Online (Sandbox Code Playgroud)
但我建议您运行上述两个命令。
最好从 anaconda 安装所有软件包:
conda update notebook
conda install jupyter notebook
conda install -c conda-forge jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_contrib_nbextensions
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4930 次 |
| 最近记录: |