快速解决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将人民币转换大写的脚本代码
Feb 10 Python
在Python的Django框架中创建和使用模版
Jul 15 Python
Python注释详解
Jun 01 Python
解决python3中的requests解析中文页面出现乱码问题
Apr 19 Python
Python 控制终端输出文字的实例
Jul 12 Python
Tensorflow实现酸奶销量预测分析
Jul 19 Python
python tkinter图形界面代码统计工具(更新)
Sep 18 Python
python飞机大战pygame游戏框架搭建操作详解
Dec 17 Python
python @propert装饰器使用方法原理解析
Dec 25 Python
python PIL/cv2/base64相互转换实例
Jan 09 Python
Python统计文本词汇出现次数的实例代码
Feb 27 Python
python安装dlib库报错问题及解决方法
Mar 16 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的curl函数的用法总结
2019/02/14 PHP
在Z-Blog中运行代码[html][/html](纯JS版)
2007/03/25 Javascript
JqGrid web打印实现代码
2011/05/31 Javascript
Jquery利用mouseenter和mouseleave实现鼠标经过弹出层且可以点击
2014/02/12 Javascript
使用jquery 简单实现下拉菜单
2015/01/14 Javascript
jQuery实现高亮显示的方法
2015/03/10 Javascript
iPhone手机上搭建nodejs服务器步骤方法
2015/07/06 NodeJs
js实现div模拟模态对话框展现URL内容
2016/05/27 Javascript
把vue-router和express项目部署到服务器的方法
2018/02/21 Javascript
boostrap模态框二次弹出清空原有内容的方法
2018/08/10 Javascript
Vuepress 搭建带评论功能的静态博客的实现
2019/02/17 Javascript
一百行JS代码实现一个校验工具
2019/04/30 Javascript
vue router总结 $router和$route及router与 router与route区别
2019/07/05 Javascript
uniapp实现横向滚动选择日期
2020/10/21 Javascript
[06:23]2014DOTA2西雅图国际邀请赛 小组赛7月12日TOPPLAY
2014/07/12 DOTA
Python中实现对Timestamp和Datetime及UTC时间之间的转换
2015/04/08 Python
Python基于回溯法解决01背包问题实例
2017/12/06 Python
Python 解决中文写入Excel时抛异常的问题
2018/05/03 Python
浅谈numpy生成数组的零值问题
2018/11/12 Python
Python中的异常处理try/except/finally/raise用法分析
2019/02/28 Python
简单介绍python封装的基本知识
2019/08/10 Python
对python while循环和双重循环的实例详解
2019/08/23 Python
TensorFlow索引与切片的实现方法
2019/11/20 Python
详解python中的lambda与sorted函数
2020/09/04 Python
CSS3+js实现简单的时钟特效
2015/03/18 HTML / CSS
css3动画 小球滚动 js控制动画暂停
2019/11/29 HTML / CSS
Mio Skincare中文官网:肌肤和身体护理
2016/10/26 全球购物
采用怎样的方法保证数据的完整性
2013/12/02 面试题
医学专业毕业生推荐信
2013/11/14 职场文书
机械制造专业个人的自我评价
2013/12/28 职场文书
医生见习报告范文
2014/11/03 职场文书
2014年仓库保管员工作总结
2014/12/03 职场文书
离职证明格式样本
2015/06/12 职场文书
2019年二手房买卖合同范本
2019/10/14 职场文书
导游词之包公祠
2019/11/25 职场文书
Nginx开启Brotli压缩算法实现过程详解
2021/03/31 Servers