I am getting the following output when running jupyter notebook. It runs ok and I have the extensions, though. I had sort of a traumatic past installing jupyter-contrib-nbextensions. Maybe a file got damaged while installing and uninstalling several times?
C:\Python27\Scripts>jupyter notebook
[I 15:02:32.174 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.2.7
[W 15:02:32.174 NotebookApp] Error loading server extension nbextensions
Traceback (most recent call last):
File "c:\python27\lib\site-packages\notebook\notebookapp.py", line 1271, in init_server_extensions
mod = importlib.import_module(modulename)
File "c:\python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Users\Diego\AppData\Roaming\jupyter\extensions\nbextensions.py", line 18, in <module>
from notebook.nbextensions import _get_nbext_dir as get_nbext_dir
ImportError: cannot import name _get_nbext_dir
[I 15:02:32.352 NotebookApp] Serving notebooks from local directory: C:\Python27\Scripts
[I 15:02:32.352 NotebookApp] 0 active kernels
[I 15:02:32.352 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=02f89503c0a2067c753bb090f993b4a07e3bede2317c3e13
[I 15:02:32.352 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:02:32.369 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=02f89503c0a2067c753bb090f993b4a07e3bede2317c3e13
I had sort of a traumatic past installing jupyter-contrib-nbextensions
Oh dear, sorry to hear it was problematic!
Maybe a file got damaged while installing and uninstalling several times?
It looks as though you've inadvertently enabled a non-existent serverextension called nbextensions. This could be in one of several config files - see http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/config.html for details of jupyter config files.
To find out which, you can use
jupyter serverextension list
To fix, you should be able to disable it using one of the commands
jupyter serverextension disable nbextensions
jupyter serverextension disable nbextensions --user
jupyter serverextension disable nbextensions --sys-prefix
Depending on which file it's been configured in. You can safely disable it in all (system, user & sys-prefix) config files by running each command, though.
Hope that makes sense 😄
Oh dear, sorry to hear it was problematic!
It is totally my fault! But thank you.
To find out which, you can use
Ok here we go:
C:\Python27\Scripts>jupyter serverextension list
config dir: C:\Users\Diego\.jupyter
jupyter_nbextensions_configurator enabled
- Validating...
jupyter_nbextensions_configurator ok
nbextensions enabled
- Validating...
Error loading server extension nbextensions
X is nbextensions importable?
config dir: C:\ProgramData\jupyter
jupyter_nbextensions_configurator enabled
- Validating...
jupyter_nbextensions_configurator ok
I have no idea why there are so many but ok your fix works perfect!
C:\Python27\Scripts>jupyter serverextension disable nbextensions
Disabling: nbextensions
- Writing config: C:\Users\Diego\.jupyter
C:\Python27\Scripts>jupyter serverextension list
config dir: C:\Users\Diego\.jupyter
jupyter_nbextensions_configurator enabled
- Validating...
jupyter_nbextensions_configurator ok
nbextensions disabled
- Validating...
Error loading server extension nbextensions
X is nbextensions importable?
config dir: C:\ProgramData\jupyter
jupyter_nbextensions_configurator enabled
- Validating...
jupyter_nbextensions_configurator ok
C:\Python27\Scripts>jupyter notebook
[I 15:55:37.466 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.2.7
[I 15:55:37.670 NotebookApp] Serving notebooks from local directory: C:\Python27\Scripts
[I 15:55:37.670 NotebookApp] 0 active kernels
[I 15:55:37.670 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=42a77a034ab7341af7cf99fc7b609759062c94857b5787c0
[I 15:55:37.670 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:55:37.670 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=42a77a034ab7341af7cf99fc7b609759062c94857b5787c0
[I 15:55:38.276 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[I 15:55:52.671 NotebookApp] Interrupted...
[I 15:55:52.671 NotebookApp] Shutting down kernels
Very kind @jcb91 ! Thanks.
Great, glad to hear you've got it sorted :)
我有一个创伤jupyter-contrib-nbextensions的创伤过去
亲爱的,很抱歉听到这个问题!
在安装和卸载多次时,文件可能已损坏?
看起来好像你无意中启用了一个不存在的serverextension
nbextensions。这可能是几个配置文件之一 - 有关jupyter配置文件的详细信息,请参阅http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/config.html。要找出哪个,你可以使用
jupyter serverextension list要修复,您应该能够使用其中一个命令禁用它
jupyter serverextension disable nbextensions jupyter serverextension disable nbextensions --user jupyter serverextension disable nbextensions --sys-prefix取决于它配置的文件。但是,您可以通过运行每个命令在所有(系统,用户和sys-prefix)配置文件中安全地禁用它。
希望有道理 😄
Thanks a lot!!!! This problem almost make my notebook didn’t work,thanks to you that I can going on my work!
FYI: I could fix the error using conda install -c conda-forge jupyterlab to install jupyter lab instead of pip (of course, in a conda env)
Most helpful comment
Oh dear, sorry to hear it was problematic!
It looks as though you've inadvertently enabled a non-existent serverextension called
nbextensions. This could be in one of several config files - see http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/config.html for details of jupyter config files.To find out which, you can use
To fix, you should be able to disable it using one of the commands
Depending on which file it's been configured in. You can safely disable it in all (system, user & sys-prefix) config files by running each command, though.
Hope that makes sense 😄