快速解决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 01 Python
python读写ini配置文件方法实例分析
Jun 30 Python
Python装饰器入门学习教程(九步学习)
Jan 28 Python
python使用pandas实现数据分割实例代码
Jan 25 Python
基于Python3.6+splinter实现自动抢火车票
Sep 25 Python
关于python之字典的嵌套,递归调用方法
Jan 21 Python
python调用c++ ctype list传数组或者返回数组的方法
Feb 13 Python
PyCharm中代码字体大小调整方法
Jul 29 Python
使用Python画了一棵圣诞树的实例代码
Nov 27 Python
python+selenium实现12306模拟登录的步骤
Jan 21 Python
 分享一个Python 遇到数据库超好用的模块
Apr 06 Python
python 闭包函数详细介绍
Apr 19 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输出控制功能在简繁体转换中的应用
2006/10/09 PHP
php 分库分表hash算法
2009/11/12 PHP
浅析PHP开发规范
2018/02/05 PHP
网页和浏览器兼容性问题汇总(draft1)
2009/06/01 Javascript
用JS实现3D球状标签云示例代码
2013/12/01 Javascript
jquery 表单验证之通过 class验证表单不为空
2015/11/02 Javascript
基于js对象,操作属性、方法详解
2016/08/11 Javascript
同步异步动态引入js文件的几种方法总结
2016/09/23 Javascript
JS中传递参数的几种不同方法比较
2017/01/20 Javascript
JS实现生成由字母与数字组合的随机字符串功能详解
2018/05/25 Javascript
js事件触发操作实例分析
2019/06/21 Javascript
vue-cli —— 如何局部修改Element样式
2020/10/22 Javascript
[40:55]DOTA2上海特级锦标赛主赛事日 - 2 败者组第二轮#4Newbee VS Fnatic
2016/03/03 DOTA
[56:29]Secret vs Optic 2018国际邀请赛小组赛BO2 第一场 8.18
2018/08/19 DOTA
简单介绍Python中的len()函数的使用
2015/04/07 Python
Python中Django框架下的staticfiles使用简介
2015/05/30 Python
简单总结Python中序列与字典的相同和不同之处
2016/01/19 Python
python3实现全角和半角字符转换的方法示例
2017/09/21 Python
Pytorch入门之mnist分类实例
2018/04/14 Python
django用户登录和注销的实现方法
2018/07/16 Python
python 移除字符串尾部的数字方法
2018/07/17 Python
Python利用lxml模块爬取豆瓣读书排行榜的方法与分析
2019/04/15 Python
python中前缀运算符 *和 **的用法示例详解
2020/05/28 Python
在Tensorflow中实现leakyRelu操作详解(高效)
2020/06/30 Python
python爬取”顶点小说网“《纯阳剑尊》的示例代码
2020/10/16 Python
canvas压缩图片以及卡片制作的方法示例
2018/12/04 HTML / CSS
JYSK加拿大:购买家具、床垫、家居装饰等
2020/02/14 全球购物
四年级学生评语大全
2014/04/21 职场文书
美国留学经济担保书
2014/05/20 职场文书
党员个人剖析材料2014
2014/10/08 职场文书
春秋淹城导游词
2015/02/11 职场文书
护士自我推荐信范文
2015/03/24 职场文书
员工表扬信怎么写
2015/05/05 职场文书
邓小平文选读书笔记
2015/06/29 职场文书
2016大学优秀学生干部事迹材料
2016/03/01 职场文书
高通2023 年将发布高性能PC处理器
2022/04/29 数码科技