有沒有辦法將Python 3.5.2設置爲CentOS 7上的默認Python版本?目前,我已將Python 2.7安裝爲默認設置,並分別安裝Python 3.5.2。Linux CentOS 7,如何將Python3.5.2設置爲默認的Python版本?
我用下面的命令
mv /usr/bin/python /usr/bin/python-old
sudo ln -fs /usr/bin/python3 /usr/bin/python
但yum
後給出了錯誤。
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory
有什麼我在這裏失蹤?
注:其Linux CentOS 7, how to set Python2.7 as default Python version?
你是正確的手冊,我試圖混淆,但模塊'libtorrent'我安裝仍然認爲Python 2.7版。因爲反正python 2.7路徑仍然是相同的 – muaaz
。使用'sudo ln -fs/usr/bin/python3/usr/bin/python'命令,我可以使用Python 3.5.2作爲默認值,但我認爲'Yum'在某種程度上依賴於2.7,所以我可以'在Python 3中使用yum命令3 – muaaz
謝謝@Veltro我在過去的5個小時裏遇到了這個問題。 – muaaz