如何正确卸载python jupyter?

Sot*_*her 10 python ipython jupyter jupyter-notebook

我在我的Mac OSXjupyter安装了,但我想要版本.所以,我基本上需要卸载该版本,并重新安装该版本. python3.5python2.73.52.7

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

?  ~/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
Run Code Online (Sandbox Code Playgroud)

...正如您在上面所看到的,该which jupyter命令仍然返回一个有效的路径,而不仅仅是那个.我仍然可以jupyter notebook从命令行启动,它打开一个笔记本.

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

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

Sim*_*ack 1

使用 pip3 代替 pip

pip3 uninstall jupyter 
Run Code Online (Sandbox Code Playgroud)

只要使用正确的 pip 版本,您就可以在同一台计算机上安装 python 2 和 python 3