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

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

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

文章目录
    • 1、卸载
    • 2、安装
    • 3、重启Jupyter

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

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

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/722764.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-26
下一篇 2022-04-26

发表评论

登录后才能评论

评论列表(0条)

保存