Skip to main content
 首页 » 编程设计

python之如何在 ipython 笔记本中创建一个新笔记本

2025年05月04日9kerrycode

我正在尝试在 ipython 中创建一个新笔记本,但笔记本选项显示为灰色。我首先打开一个控制台并转到 ipython 文件夹并使用 ipyhon notebook 启动。我收到以下看起来不像错误的消息:

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\aurquhart>cd ipython

C:\Users\ipython>ipython notebook [I 09:20:46.487 NotebookApp] Using existing profile dir: 'C:\Users\ ipython\profile_default' [I 09:20:46.501 NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mat hjax/latest/MathJax.js [I 09:20:46.563 NotebookApp] Serving notebooks from local directory: C:\Users \ipython [I 09:20:46.564 NotebookApp] 0 active kernels [I 09:20:46.564 NotebookApp] The IPython Notebook is running at: http://localhos t:8888/ [I 09:20:46.564 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

然后它会打开一个指向 http://localhost:8888/tree 的浏览器窗口但是添加新笔记本的选项是空白的。尽管我无法运行它们,但我可以在文件夹中看到各种 python 脚本。

关于如何打开新笔记本有什么想法吗?

请您参考如下方法:

感谢 AniaG - 有一个选项可以添加一个新的 Python 3,它实际上会创建一个新的笔记本。我之前试过这个但没有用,但是一旦我导航到 ipython 文件夹并从这里运行 ipython,这个选项现在就可以使用了。