![](/img/trans.png)
[英]On Ubuntu, how do you install a newer version of python and keep the older python version?
[英]Ubuntu switch to newer version of python
安裝Ubuntu 14.0.4時我有python 2.7.6。 我從來源編譯了Python 2.7.8:
wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
tar -xzvf Python-2.7.8.tgz
cd Python-2.7.8
./configure --enable-shared --enable-static
make
sudo make install
然后當我鍵入:
python --version
輸出仍然是Python 2.7.6。 我想使用python 2.7.8。 我想念什么?
嘗試sudo apt-get update
,然后sudo apt-get upgrade
和sudo apt-get dist-upgrade
,它將安裝軟件的最新版本。
您應該從版本中刪除以前的版本,然后將新版本添加到您的環境中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.