我已經使用以下步驟安裝了Python 2.7.10版本。Python安裝版本無法顯示(Python 2.7.10)
cd /usr/src
wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
tar xzf Python-2.7.10.tgz
cd Python-2.7.10
sudo ./configure
sudo make altinstall
並設置環境veriable到
出口PATH =〜在/ usr/local/lib目錄/ python2.7.10 /斌/ Python的:$ PATH
但是當我運行python在shell中。默認版本顯示爲Python 2.7.6
[email protected]:/# python
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
如何排序此問題?
'〜/ usr/local/lib /'是一個奇怪的文件路徑...你確定不應該是'/ usr/local/lib /'嗎? –
你可以運行'which python'來驗證你的'PATH'設置正確 –
'哪個python'顯示這個 'root @ SUP-DIGINBENCH:/ var/www/html#其中python /usr/bin/python ' – Daz