I have jupyter
安装有python3.5
on my Mac OSX,但我想要python2.7
版本。所以,我基本上需要卸载3.5
版本,然后重新安装2.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
...正如您在上面看到的,which jupyter
命令仍然返回有效路径,而且不仅如此。我仍然可以启动jupyter notebook
从命令行,它会打开一个笔记本。
如何正确删除现有版本jupyter
?或者,如果有人知道如何添加python2
内核到我现有的jupyter
,这样也好。那可能吗?
我能想到的就是手动杀死里面的文件和子文件夹/Library/Frameworks/Python.framework/Versions/3.5/bin/
,但这似乎不必要的残酷?
从你的home
文件夹,删除~/AnacondaProjects
。之后删除export
of Anaconda environment variable
从你的 bash 配置文件中~/.bashrc
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)