jupyter notebook的简单安装及遇到问题的解决方案

1.检查python 中pip install 安装包的路径

在cmd中输入

python
​
import os
​
os

2.升级pip,不然安装容易失败

首先直接在pip输入

pip3 install --upgrade pip

出现错误:“系统无法将文件移到不同的磁盘驱动器”

经查阅,输入以下命令解决:

python -m ensurepip
python -m pip install -i https://mirrors.aliyun.com/pypi/simple/ --upgrade pip 

3.安装 jupyter notebook

pip install jupyter notebook

4.运行看是否安装成功:

在cmd中输入

jupyter notebook

如果失败,则需要配置环境变量,在cmd中输入:

sysdm.cpl

5.成功后在IE打开jupyter notebook,复制到其他浏览器出现:

Password or token

这时复制cmd中的地址再粘贴到浏览器即可

6.jupyter notebook指定启动目录

6.1 临时进入某个目录

先在cmd中进入指定文件夹

cd /d f:\jupyter notebook

cd /d F:\Programing\Python language\jupyter notebook

再输入:

jupyter notebook

6.2 打开jupyter notebook 后 永远进入某指定目录作为启动目录

6.2.1

在cmd命令行中输入命令:

jupyter notebook --generate-config

生成配置文件

6.2.2修改配置文件

根据路径找到 jupyter_notebook_config.py,搜索 c.NotebookApp.notebook_dir ,去掉注释后将其改为(注意地址前面不能加 r 啥的,不然就失败了):

c.NotebookApp.notebook_dir = 'F:/Programing/Python language/jupyter notebook'

6.2.3建立快捷方式,直接打开 jupyter notebook

在启动目录内建立一个bat文件:

jupyter notebook.bat

里面写:

jupyter notebook

再建一个快捷方式即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值