无法运行Jupyter笔记本,但运行qtconsole

时间:2018-05-08 09:52:23

标签: python installation anaconda jupyter-notebook

我在Windows 7上安装了64位Anaconda Navigator。无法运行Jupyter笔记本,但能够运行qtconsole。

启动笔记本时出现的错误是

 [I 14:50:50.679 NotebookApp] The port 8888 is already in use, trying 
 another port.
 [I 14:50:50.680 NotebookApp] The port 8889 is already in use, trying 
 another port.
 [I 14:50:52.093 NotebookApp] JupyterLab beta preview extension loaded 
 from E:\Users\jiten\Anaconda3\lib\site-packages\jupyterlab
 [I 14:50:52.093 NotebookApp] JupyterLab application directory is 
 E:\Users\jiten\Anaconda3\share\jupyter\lab
 [W 14:50:52.249 NotebookApp] Error loading server extension jupyterlab
 Traceback (most recent call last):
 File "E:\Users\jiten\Anaconda3\lib\site-
 packages\jupyterlab\commands.py", line 321, in __init__
 self._run(['node', 'node-version-check.js'], cwd=HERE, quiet=True)
 File "E:\Users\jiten\Anaconda3\lib\site-
 packages\jupyterlab\commands.py", line 1165, in _run
 proc = Process(cmd, **kwargs)
 File "E:\Users\jiten\Anaconda3\lib\site-packages\jupyterlab\process.py", 
 line 73, in __init__
 self.proc = self._create_process(cwd=cwd, env=env)
 File "E:\Users\jiten\Anaconda3\lib\site-packages\jupyterlab\process.py", 
 line 131, in _create_process
 cmd[0] = which(cmd[0], kwargs.get('env'))
 File "E:\Users\jiten\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:\Users\jiten\Anaconda3\lib\site-packages\notebook\notebookapp.py", 
 line 1454, in init_server_extensions
 func(self)
 File "E:\Users\jiten\Anaconda3\lib\site-packages\jupyterlab\extension.py", 
 line 111, in load_jupyter_server_extension
 info = get_app_info(app_dir)
 File "E:\Users\jiten\Anaconda3\lib\site-packages\jupyterlab\commands.py", 
 line 244, in get_app_info
 handler = _AppHandler(app_dir, logger)
 File "E:\Users\jiten\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 14:50:55.229 NotebookApp] Serving notebooks from local directory: 
 C:\Users\jiten
 [I 14:50:55.230 NotebookApp] 0 active kernels
 [I 14:50:55.230 NotebookApp] The Jupyter Notebook is running at:
 [I 14:50:55.230 NotebookApp] http://localhost:8890/?
 token=b940b659aa0077da88a7b4247dc4fac2355ff6e405801078
 [I 14:50:55.231 NotebookApp] Use Control-C to stop this server and shut 
 down all kernels (twice to skip confirmation).
 [C 14:50:55.234 NotebookApp] 

 Copy/paste this URL into your browser when you connect for the first time,
 to login with a token:
 http://localhost:8890/?
 token=b940b659aa0077da88a7b4247dc4fac2355ff6e405801078

虽然在我的默认浏览器中打开了一个空白页面(已选择IE,但已安装的少数几个),网页地址为:

http://localhost:8890/tree?token=b6a5317718c42147edea2aac32ebd401ea091c730d3daeeb

另外,我无法从命令提示符运行命令' python' as给出了错误:

C:\Windows\system32>python
'python' is not recognized as an internal or external command,
operable program or batch file.

很抱歉,尽管我付出了最大努力,但我的理解是安装过程非常糟糕,以及如何包含路径。此外,不知道我的安装是否在E:驱动器中完成导致这些问题,即不是C:驱动器。
请举例,或详细解释,或类似的网站'链接。

更新1:有一个单独的' Anaconda命令提示符'查看Anaconda Navigator安装的Python版本。可以通过“开始”访问它。菜单。发现this clip非常有帮助。

1 个答案:

答案 0 :(得分:2)

您似乎缺少nodejs:

尝试从以下位置下载和安装: https://nodejs.org/en/

这应该可以解决Jupyterlab的问题。

我不是Anaconda Navigator的用户,但据我所知,它使用环境来管理python安装。 您应该从Navigator创建至少一个环境,并在尝试运行python之前选择它。

更多信息来自Anaconda Navigator文档: https://docs.anaconda.com/anaconda/navigator/getting-started

相关问题