D:\Python\python.exe "D:\PyCharm 2018.2.1\helpers\pycharm\pycharm_load_entry_point.py" notebook --no-browser --ip 127.0.0.1 --port 8886 --port-retries=0
[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
[W 17:58:52.576 NotebookApp] Terminals not available (error was No module named 'winpty.cywinpty')
[I 17:58:52.579 NotebookApp] Serving notebooks from local directory: D:\Python projects\Projects
[I 17:58:52.579 NotebookApp] The Jupyter Notebook is running at:
每当我运行x.ipynb文件时,它都会返回上述错误msg,我只能在浏览器中访问jupyter。 如何在pycharm中运行它?
答案 0 :(得分:1)
您可以将PyCharm用作IDE的替代品,以便在浏览器中编辑Jupyter笔记本,但是它不会自动为您运行笔记本服务器。您可以简单地在PyCharm中打开* .ipynb文件,并使用专用的笔记本编辑器打开它。首次运行单元格时,它将询问您正在运行的笔记本的网址,例如http://localhost:8888/?token=<token>
您可以通过在控制台中运行以下命令来获取此URL:
jupyter notebook list
运行笔记本服务器是另一回事。您可以从外部进行操作,也可以使用内置的“ Jupyer Notebook”运行模板(通过“ Run ...”菜单)。当您从PyCharm内部启动服务器时,您将在运行控制台中获得笔记本的URL。