win10系统,利用conda 先卸载 再安装 jupyter notebook

@创建于:2022.04.22
@修改于:2022.04.22

Anaconda自动安装juypyter notebook。长时间后,jupyter notebook出现问题:无法连接内核;打不开闪退等。本篇利用先卸载再重装策略,解决问题。

1、卸载

进入Anaconda Prompt模式(管理员身份打开),输入如下命令:

conda uninstall notebook

经过长时间运行,结束后,发现Jupyter Notebook启动栏和快捷键消失了,表明卸载成功了。下面的命令不起作用,也表明卸载成功。

jupyter notebook

有博客说这样无法完全卸载,需要使用下面的命令。我没有尝试。
卸载jupyter notebook 重新安装

# 这里用pip,若是pip3请自行改正
pip install pip-autoremove
pip-autoremove jupyter -y

2、安装

进入Anaconda Prompt模式(管理员身份打开),输入如下命令:

pip install --upgrade --force-reinstall --no-cache-dir jupyter

# 上面命令报错
# ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: 'C:\\Users\\chenlim\\AppData\\Local\\Temp\\pip-uninstall-xy9_fwaf\\jsonschema.exe' Consider using the `--user` option or check the permissions.
# 尝试下面命令,增加--user
pip install --user --upgrade --force-reinstall --no-cache-dir jupyter

# 下面两种方法,我也尝试了,安装过程报错,安装失败。
pip3 install --upgrade --force-reinstall --no-cache-dir jupyter
pip3 install --user --upgrade --force-reinstall --no-cache-dir jupyter

以上安装方法是失败的,安装过程报错,不清楚为什么!有知道原因的,请您给我留言,告诉我。提前感谢。

# 该命令,安装成功
conda install -y jupyter

# 这个命令,在一个虚拟环境下安装成功
conda install jupyter notebook

安装成功后,Jupyter Notebook启动栏和快捷键也没有出现。有博客说,需要做特殊配置。本文不赘述

3、重启Jupyter

进入Anaconda Prompt模式(管理员身份打开),输入如下命令:

jupyter notebook

能够被启动,表明安装成功了。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值