温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

jupyter启动卡死怎么办

发布时间:2020-08-04 14:04:43 来源:亿速云 阅读:333 作者:小猪 栏目:开发技术

小编这次要给大家分享的是jupyter启动卡死怎么办,文章内容丰富,感兴趣的小伙伴可以来了解一下,希望大家阅读完这篇文章之后能够有所收获。

问题描述

系统:Win10;之前安装过Cpython,现在依次使用pip install ipython与pip install jupyter安装了 Ipython 6.5.0与 jupyter 1.0.0。但是在PowerShell上使用命令jupyter notebook 运行jupyter时服务器始终卡顿,根本没法用。

解决方法

使用命令jupyter notebook --generate-config 可看到文件 jupyter_notebook_config.py位置

手动打开文件进行编辑,找到c.NotebookApp.notebook_dir 修改默认目录并去掉注释保存,最好修改目录到非C盘 c.NotebookApp.notebook_dir = 'E:\\Program Files\Python3_6_6\jupyter'(大约246行,注意磁盘名后面是双斜线)

jupyter notebook启动服务器,正常运行

补充知识:jupyter notebook 浏览器打开空白卡死情况

jupyter notebook 需要用谷歌浏览器打开才可以,其他的浏览器打开后多半是空白的。添加默认浏览器如下:

1.在anaconda prompt 里面直接输入或cmd中输入(前提是已经将anaconda加入环境变量):

jupyter notebook --generate-config

让jupyter生成一个配置文件,生成后你会看到文件地址的,如图所示:

C:\Users\Administrator\.jupyter\jupyter_notebook_config.py

2.然后就可以使用记事本之类的,打开这个jupyter_notebook_config.py文件

然后查找,browser,找到如下代码:

## Specify what command to use to invoke a web browser when opening the notebook.
# If not specified, the default browser will be determined by the `webbrowser`
# standard library module, which allows setting of the BROWSER environment
# variable to override it.
#c.NotebookApp.browser = u''

在这个后面,添加如下代码(google浏览器):

## Specify what command to use to invoke a web browser when opening the notebook.
# If not specified, the default browser will be determined by the `webbrowser`
# standard library module, which allows setting of the BROWSER environment
# variable to override it.
#c.NotebookApp.browser = ''
 
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser(u'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser = 'chrome'

看完这篇关于jupyter启动卡死怎么办的文章,如果觉得文章内容写得不错的话,可以把它分享出去给更多人看到。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI