快速解决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实现多线程的两种方式
May 22 Python
python机器人行走步数问题的解决
Jan 29 Python
python实时监控cpu小工具
Jun 21 Python
Python Excel处理库openpyxl使用详解
May 09 Python
python实践项目之监控当前联网状态详情
May 23 Python
简单了解python 邮件模块的使用方法
Jul 24 Python
django基于存储在前端的token用户认证解析
Aug 06 Python
python tkinter 设置窗口大小不可缩放实例
Mar 04 Python
Python中Yield的基本用法
Oct 18 Python
Python更改pip镜像源的方法示例
Dec 01 Python
python读写数据读写csv文件(pandas用法)
Dec 14 Python
如何用Python编写一个电子考勤系统
Feb 08 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
收音机另类DIY - 纸巾盒做外壳
2021/03/02 无线电
领悟php接口中interface存在的意义
2013/06/27 PHP
PHP实现Soap通讯的方法
2014/11/03 PHP
PHP解密Unicode及Escape加密字符串
2015/05/17 PHP
PHP使用openssl扩展实现加解密方法示例
2020/02/20 PHP
javascript比较文档位置
2008/04/08 Javascript
javascript 验证日期的函数
2010/03/18 Javascript
JS 操作符整理[推荐收藏]
2011/11/15 Javascript
jquery如何把数组变为字符串传到服务端并处理
2014/04/30 Javascript
jQuery定义背景动态切换效果的方法
2015/03/23 Javascript
js实现仿百度汽车频道选择汽车图片展示实例
2015/05/06 Javascript
jquery.fastLiveFilter.js实现输入自动过滤的方法
2015/08/11 Javascript
JQuery点击事件回到页面顶部效果的实现代码
2016/05/24 Javascript
nodejs个人博客开发第三步 载入页面
2017/04/12 NodeJs
vue+swiper实现侧滑菜单效果
2017/12/28 Javascript
基于 Vue.js 2.0 酷炫自适应背景视频登录页面实现方式
2018/01/17 Javascript
JS中touchstart事件与click事件冲突的解决方法
2018/03/12 Javascript
vue.js动画中的js钩子函数的实现
2018/07/06 Javascript
详解jQuery获取特殊属性的值以及设置内容
2018/11/14 jQuery
JavaScript自定义超时API代码实例
2020/04/30 Javascript
vant时间控件使用方法详解
2020/12/24 Javascript
开源软件包和环境管理系统Anaconda的安装使用
2017/09/04 Python
利用ctypes获取numpy数组的指针方法
2019/02/12 Python
python创造虚拟环境方法总结
2019/03/04 Python
为什么python比较流行
2020/06/19 Python
python读取xml文件方法解析
2020/08/04 Python
Scrapy爬虫文件批量运行的实现
2020/09/30 Python
python爬虫破解字体加密案例详解
2021/03/02 Python
html5 Web SQL Database 之事务处理函数transaction与executeSQL解析
2013/11/07 HTML / CSS
不可轻视HTML5!App三年内将被html5顶替彻底消失
2015/11/18 HTML / CSS
英格兰足协官方商店:England Store
2019/07/12 全球购物
施工班组长岗位职责
2014/01/05 职场文书
关爱留守儿童倡议书
2014/04/15 职场文书
兵马俑的导游词
2015/02/02 职场文书
房地产销售员岗位职责
2015/04/11 职场文书
CSS使用Flex和Grid布局实现3D骰子
2022/08/05 HTML / CSS