1

我按照说明运行 ipython.exe 笔记本:

> [TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is
> deprecated and will be removed in future versions.
> [TerminalIPythonApp] WARNING | You likely want to use `jupyter
> notebook` in the future Traceback (most recent call last):   File
> "C:\Miniconda3\Scripts\ipython-script.py", line 5, in <module>
>     sys.exit(IPython.start_ipython())   File "C:\Miniconda3\lib\site-packages\IPython\__init__.py", line 119, in
> start_ipython
>     return launch_new_instance(argv=argv, **kwargs)   File "C:\Miniconda3\lib\site-packages\traitlets\config\application.py",
> line 657, in launch_instance
>     app.initialize(argv)   File "<decorator-gen-110>", line 2, in initialize   File
> "C:\Miniconda3\lib\site-packages\traitlets\config\application.py",
> line 87, in catch_config_error
>     return method(app, *args, **kwargs)   File "C:\Miniconda3\lib\site-packages\IPython\terminal\ipapp.py", line 300,
> in initialize
>     super(TerminalIPythonApp, self).initialize(argv)   File "<decorator-gen-7>", line 2, in initialize   File
> "C:\Miniconda3\lib\site-packages\traitlets\config\application.py",
> line 87, in catch_config_error
>     return method(app, *args, **kwargs)   File "C:\Miniconda3\lib\site-packages\IPython\core\application.py", line
> 446, in initialize
>     self.parse_command_line(argv)   File "C:\Miniconda3\lib\site-packages\IPython\terminal\ipapp.py", line 295,
> in parse_command_line
>     return super(TerminalIPythonApp, self).parse_command_line(argv)   File "<decorator-gen-4>", line 2, in parse_command_line   File
> "C:\Miniconda3\lib\site-packages\traitlets\config\application.py",
> line 87, in catch_config_error
>     return method(app, *args, **kwargs)   File "C:\Miniconda3\lib\site-packages\traitlets\config\application.py",
> line 514, in parse_command_line
>     return self.initialize_subcommand(subc, subargv)   File "C:\Miniconda3\lib\site-packages\IPython\core\application.py", line
> 236, in initialize_subcommand
>     return super(BaseIPythonApplication, self).initialize_subcommand(subc, argv)   File "<decorator-gen-3>",
> line 2, in initialize_subcommand   File
> "C:\Miniconda3\lib\site-packages\traitlets\config\application.py",
> line 87, in catch_config_error
>     return method(app, *args, **kwargs)   File "C:\Miniconda3\lib\site-packages\traitlets\config\application.py",
> line 445, in initialize_subcommand
>     subapp = import_item(subapp)   File "C:\Miniconda3\lib\site-packages\ipython_genutils\importstring.py",
> line 31, in import_item
>     module = __import__(package, fromlist=[obj]) ImportError: No module named 'notebook'

现在,如果我运行 jupyter notebook,我得到:

C:\Miniconda3\Scripts>jupyter notebook Traceback(最近一次调用最后):文件“C:\Miniconda3\Scripts\jupyter-script.py”,第 5 行,在 sys.exit(jupyter_core.command.main()) 文件中“C:\Miniconda3\lib\site-packages\jupyter_core\command.py”,第 186 行,在 main _execvp(command, sys.argv[1:]) 文件“C:\Miniconda3\lib\site-packages\jupyter_core \command.py",第 104 行,在 _execvp 中引发 OSError('%r not found' % cmd, errno.ENOENT) OSError: [Errno None not found] 2

我需要将我的工作保存为 ipython 笔记本。我该怎么做?

4

2 回答 2

2

就像zwol说的那样,您的安装可能已经搞砸了。你可以做两件事。

  1. 完全删除您的 miniconda 安装,然后重试。
  2. 创建一个新环境并在那里安装 ipython/jupyter。我会先试试这个。

    conda create -n myenv python=3
    activate myenv
    conda install jupyter
    jupyter notebook

于 2016-10-03T02:03:43.697 回答
0

我遇到了同样的问题,但我创建了一个“testenv”并在那里运行 jupyter notebook,它对我有用。主要安装有些问题,但您可以在不同的环境中安装工作。

于 2017-03-16T13:29:20.033 回答