我的jupyter
安裝了python3.5
我的Mac OSX,但我想要python2.7
版本。所以,我基本上需要卸載3.5
版本,並重新安裝2.7
版本。如何正確卸載python jupyter?
但由於某些原因,我無法卸載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/
內的文件和子文件夾,但這看起來不必要的殘酷?
試試'sudo -H python3 -m pip卸載jupyter'。 – edwinksl
結果是:'20:39 $ sudo -H python3 -m pip卸載jupyter 密碼: 無法卸載要求jupyter,未安裝 您正在使用pip版本8.1.1,但是版本8.1.2可用。 您應該考慮通過'pip install --upgrade pip'命令進行升級。 ' – Sother
@edwinksl,它不能解決它看起來像的問題。但是,謝謝。 – Sother