快速解决jupyter启动卡死的问题


Posted in Python onApril 10, 2020

问题描述

系统: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启动卡死的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持三水点靠木。

Python 相关文章推荐
初学Python函数的笔记整理
Apr 07 Python
django使用html模板减少代码代码解析
Dec 12 Python
Flask web开发处理POST请求实现(登录案例)
Jul 26 Python
Python3自动签到 定时任务 判断节假日的实例
Nov 13 Python
对python中的float除法和整除法的实例详解
Jul 20 Python
Django认证系统实现的web页面实现代码
Aug 12 Python
Pandas实现DataFrame按行求百分数(比例数)
Dec 27 Python
Python实现在Windows平台修改文件属性
Mar 05 Python
3种适用于Python的疯狂秘密武器及原因解析
Apr 29 Python
Python如何读写二进制数组数据
Aug 01 Python
python UIAutomator2使用超详细教程
Feb 19 Python
Python实现列表拼接和去重的三种方式
Jul 02 Python
Python操作Jira库常用方法解析
Apr 10 #Python
jupyter notebook 使用过程中python莫名崩溃的原因及解决方式
Apr 10 #Python
jupyter lab的目录调整及设置默认浏览器为chrome的方法
Apr 10 #Python
jupyter notebook 参数传递给shell命令行实例
Apr 10 #Python
调整Jupyter notebook的启动目录操作
Apr 10 #Python
解决jupyter notebook显示不全出现框框或者乱码问题
Apr 09 #Python
jupyter 实现notebook中显示完整的行和列
Apr 09 #Python
You might like
php图片验证码代码
2008/03/27 PHP
php实现在线生成条形码示例分享(条形码生成器)
2013/12/30 PHP
ThinkPHP在新浪SAE平台的部署实例
2014/10/31 PHP
php+ajax实现带进度条的上传图片功能【附demo源码下载】
2016/09/14 PHP
PHP设计模式之单例模式原理与实现方法分析
2018/04/25 PHP
html下载本地
2006/06/19 Javascript
jQuery之字体大小的设置方法
2014/02/27 Javascript
jQuery如何取id有.的值一般的方法是取不到的
2014/04/18 Javascript
js实现文本框宽度自适应文本宽度的方法
2015/08/13 Javascript
详解AngularJS中module模块的导入导出
2015/12/10 Javascript
原生js实现无限循环轮播图效果
2017/01/20 Javascript
js阻止移动端页面滚动的两种方法
2017/01/25 Javascript
AngularJS之页面跳转Route实例代码
2017/03/10 Javascript
angular.js实现购物车功能
2017/10/23 Javascript
js动态设置select下拉菜单的默认选中项实例
2018/08/21 Javascript
vue--vuex详解
2019/04/15 Javascript
微信小程序云开发如何使用npm安装依赖
2019/05/18 Javascript
JavaScript获取某一天所在的星期
2019/09/05 Javascript
[03:08]TI9战队档案 - Vici Gaming
2019/08/20 DOTA
Python标准库os.path包、glob包使用实例
2014/11/25 Python
在Python中使用M2Crypto模块实现AES加密的教程
2015/04/08 Python
Python素数检测的方法
2015/05/11 Python
Python实现二叉堆
2016/02/03 Python
基于python实现的抓取腾讯视频所有电影的爬虫
2016/04/22 Python
利用 Monkey 命令操作屏幕快速滑动
2016/12/07 Python
Python OS模块实例详解
2019/04/15 Python
python实现对图片进行旋转,放缩,裁剪的功能
2019/08/07 Python
如何提高python 中for循环的效率
2020/04/15 Python
全球速卖通巴西站点:Aliexpress巴西
2016/08/24 全球购物
Nike意大利官网:Nike.com IT
2020/01/19 全球购物
关于母亲节的感言
2014/02/04 职场文书
初中生思想道德自我评价
2015/03/09 职场文书
学雷锋活动简报
2015/07/20 职场文书
初中英语教学反思范文
2016/02/15 职场文书
Python 恐龙跑跑小游戏实现流程
2022/02/15 Python
redis lua限流算法实现示例
2022/07/15 Redis