Ich habe Python-Version 2.7.10 mit den folgenden Schritten installiert.Python installiert Version nicht angezeigt (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
und die Umwelt gesetzt veriable zu
export PATH = ~/usr/local/lib/python2.7.10/bin/python: $ PATH
aber wenn ich laufen Python in der Shell. Die Standardversion wird als Python 2.7.6 angezeigt.
[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.
>>>
Wie kann ich dieses Problem beheben?
'~/usr/local/lib /' ist ein seltsam aussehender Dateipfad ... Sind Sie sicher, dass das nicht '/ usr/local/lib /' sein sollte? –
Und Sie können 'which python' ausführen, um zu überprüfen, dass' PATH' korrekt eingestellt ist. –
'which python' zeigt dies ' root @ SUP-DIGINBENCH:/var/www/html # welche python /usr/bin/python ' – Daz