尝试执行jupyter-notebook时出错

时间:2017-06-10 19:41:10

标签: python windows ipython jupyter-notebook jupyter

我在控制台中尝试执行jupyter-notebook时遇到错误,错误发生在这里:

devnull = open(os.devnull, 'w')
    FileNotFoundError: [Errno 2] No such file or directory: 'nul'

奇怪的是它开始发生在一天到另一天,因为直到最近我才能完美地使用jupyter-notebook,因为我卸载了这个错误,然后重新安装了anaconda,但错误仍然存​​在。

我的操作系统是Windows 10,我安装了64-bit installer with python 3.6

Traceback是:

C:\Users\username\Anaconda3\Scripts>jupyter notebook
Traceback (most recent call last):
  File "C:\Users\username\Anaconda3\Scripts\jupyter-notebook-script.py", line 5, in <module>
    sys.exit(notebook.notebookapp.main())
  File "C:\Users\username\Anaconda3\lib\site-packages\jupyter_core\application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "C:\Users\username\Anaconda3\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "C:\Users\username\Anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Users\username\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 1296, in initialize
    self.init_webapp()
  File "C:\Users\username\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 1093, in init_webapp
    self.jinja_environment_options
  File "C:\Users\username\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 167, in __init__
    default_url, settings_overrides, jinja_env_options)
  File "C:\Users\username\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 259, in init_settings
    nbextensions_path=jupyter_app.nbextensions_path,
  File "C:\Users\username\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 807, in nbextensions_path
    from IPython.paths import get_ipython_dir
  File "C:\Users\username\Anaconda3\lib\site-packages\IPython\__init__.py", line 49, in <module>
    from .terminal.embed import embed
  File "C:\Users\username\Anaconda3\lib\site-packages\IPython\terminal\embed.py", line 17, in <module>
    from IPython.core.interactiveshell import DummyMod, InteractiveShell
  File "C:\Users\username\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 62, in <module>
    from IPython.utils import io
  File "C:\Users\username\Anaconda3\lib\site-packages\IPython\utils\io.py", line 90, in <module>
    devnull = open(os.devnull, 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'nul'

欢迎任何帮助。

0 个答案:

没有答案