请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

jupyter notebook出现错误

[I 15:04:56.323 NotebookApp] The port 8888 is already in use, trying another port.
[I 15:04:56.324 NotebookApp] The port 8889 is already in use, trying another port.
[I 15:04:56.325 NotebookApp] The port 8890 is already in use, trying another port.
[I 15:04:56.521 NotebookApp] JupyterLab beta preview extension loaded from E:\program\Anaconda3\lib\site-packages\jupyterlab
[I 15:04:56.521 NotebookApp] JupyterLab application directory is E:\program\Anaconda3\share\jupyter\lab
[W 15:04:56.539 NotebookApp] Error loading server extension jupyterlab
Traceback (most recent call last):
File "E:\program\Anaconda3\lib\site-packages\jupyterlab\commands.py", line 321, in __init__
self._run(['node', 'node-version-check.js'], cwd=HERE, quiet=True)
File "E:\program\Anaconda3\lib\site-packages\jupyterlab\commands.py", line 1165, in _run
proc = Process(cmd, **kwargs)
File "E:\program\Anaconda3\lib\site-packages\jupyterlab\process.py", line 73, in __init__
self.proc = self._create_process(cwd=cwd, env=env)
File "E:\program\Anaconda3\lib\site-packages\jupyterlab\process.py", line 131, in _create_process
cmd[0] = which(cmd[0], kwargs.get('env'))
File "E:\program\Anaconda3\lib\site-packages\jupyterlab\jlpmapp.py", line 59, in which
raise ValueError(msg)
ValueError: Please install nodejs 5+ and npm before continuing installation. nodejs may be installed using conda or directly from the nodejs website.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\program\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 1454, in init_server_extensions
func(self)
File "E:\program\Anaconda3\lib\site-packages\jupyterlab\extension.py", line 111, in load_jupyter_server_extension
info = get_app_info(app_dir)
File "E:\program\Anaconda3\lib\site-packages\jupyterlab\commands.py", line 244, in get_app_info
handler = _AppHandler(app_dir, logger)
File "E:\program\Anaconda3\lib\site-packages\jupyterlab\commands.py", line 324, in __init__
raise ValueError(msg)
ValueError: Please install nodejs 5+ and npm before continuing installation. nodejs may be installed using conda or directly from the nodejs website.
[I 15:04:56.684 NotebookApp] Serving notebooks from local directory: C:\Users\Rachel
[I 15:04:56.684 NotebookApp] 0 active kernels
[I 15:04:56.684 NotebookApp] The Jupyter Notebook is running at:
[I 15:04:56.684 NotebookApp] http://localhost:8891/?token=9308135b344b9dab291584a925cdea8ed0c8eaab05e3ce4f
[I 15:04:56.684 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:04:56.687 NotebookApp]

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8891/?token=9308135b344b9dab291584a925cdea8ed0c8eaab05e3ce4f
[I 15:04:56.867 NotebookApp] Accepting one-time-token-authenticated connection from ::1


出现了上面的情况,不过最后又出现另一个端口号的jupyter

https://img1.sycdn.imooc.com//szimg/5abc919b00012f0f08830200.jpg

同时 在pycharm中导入numpy报错

我之前有安装python 3

不知道是jupyter出错的问题还是我之前有安装的问题还是我改变路径后环境变化的问题......

正在回答

插入代码

1回答

liuyubobobo 2018-03-29 15:46:33

jupyter notebook的错误中,你的8888,8889,8890端口被别的应用占用了,请自行查找被哪些应用占用了。不过由于你的8891端口可以使用,jupyter notebook给你了一个URL,使用8891端口。直接粘贴最后给你的URL地址,应该就可以启动jupyter notebook。


对于Pycharm中导入numpy的问题,如果你的Jupyter Notebook可以正确import numpy,那么你的numpy安装就没有问题。由于你之前安装过Python,应该是你的Pycharm的解析器指向的是你之前安装的Python。将解析器的指向调整到你的Anaconda安装目录下相应的Python就可以了。具体可以在新建项目的时候调节,也可以在项目中的Setting里调节。可以参见下图。注意我的Project Interpreter,指向的是Anaconda下的Python。


https://img1.sycdn.imooc.com//szimg/5abc99ba0001da5f09860667.jpg


0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号