【问题标题】:Unable to run Jupyter notebook, but running qtconsole无法运行 Jupyter 笔记本,但正在运行 qtconsole
【发布时间】:2018-05-08 09:52:22
【问题描述】:

我在 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”,因为给出了错误:

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 很有帮助。

【问题讨论】:

    标签: python installation anaconda jupyter-notebook


    【解决方案1】:

    看来你缺少 nodejs:

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

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

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

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

    【讨论】:

      猜你喜欢
      • 2020-11-18
      • 2017-05-25
      • 1970-01-01
      • 1970-01-01
      • 2023-03-10
      • 1970-01-01
      • 2018-03-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多