如何正确卸载python jupyter? [英] How to uninstall python jupyter correctly?

查看:1677
本文介绍了如何正确卸载python jupyter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Mac OSX 上安装 python3.5 jupyter ,但是我想要 python2.7 版本。所以,我基本上需要卸载 3.5 版本,然后重新安装 2.7 版本。

I have jupyter installed with python3.5 on my Mac OSX, but I want the python2.7 version. So, I basically need to uninstall the 3.5 version, and reinstall the 2.7 version.

但由于某种原因我无法卸载3.5版本。我试过 sudo python3 -m pip uninstall jupyter ,你可以看到下面的结果:

But for some reason I can't uninstall the 3.5 version. I tried sudo python3 -m pip uninstall jupyter, and you can see the results below:

✔  ~/current/directory  
20:08 $ which jupyter
/Library/Frameworks/Python.framework/Versions/3.5/bin/jupyter
✔  ~/current/directory  
20:08 $ sudo python3 -m pip uninstall jupyter
The directory '/Users/<username>/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Cannot uninstall requirement jupyter, not installed
The directory '/Users/<username>/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
✘-1  ~/current/directory  
20:09 $ which jupyter
/Library/Frameworks/Python.framework/Versions/3.5/bin/jupyter

...如上所示,哪个jupyter 命令仍返回有效路径,不仅如此。我仍然可以从命令行启动 jupyter notebook ,然后打开一个笔记本。

...as you can see above, the which jupyter command still returns a valid path, AND not only that. I'm still able to launch jupyter notebook from the command line, and it opens a notebook.

怎么做我正确地摆脱了现有版本的 jupyter ?或者,如果有人知道如何将 python2 内核添加到我现有的 jupyter 中,那也没关系。这可能吗?

How do I correctly get rid of my existing version of jupyter ? OR, if someone knows how to ADD a python2 kernel to my existing jupyter, that would be fine too. Is that possible?

我能想到的是手动杀死 /Library/Frameworks/Python.framework/Versions中的文件和子文件夹/3.5/bin / ,但这似乎不必要地残酷?

All I can think of is to manually kill the files and subfolders inside of /Library/Frameworks/Python.framework/Versions/3.5/bin/, but this seems unnecessarily brutal?

推荐答案

从你的 home 文件夹,删除〜/ AnacondaProjects 。之后,从您的bash配置文件中删除导出 Anaconda环境变量 〜/ .bashrc

From your home folder, delete ~/AnacondaProjects. After that remove the export of Anaconda environment variable from your bash profile ~/.bashrc .

这篇关于如何正确卸载python jupyter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆