“Ändern Sie die Standard -Python -Version” Code-Antworten

So ändern Sie die Python -Version unter Linux

#Check available versions
ls /usr/bin/python*
#Change the used version 3.5 or 3.7 etc
alias python='/usr/bin/python3.x'
#do this other thing
. ~/.bashrc
#Check version 
python --version
Glamorous Gnat

Ändern Sie die Standard -Python -Version

sudo update-alternatives --config python
Sjk-Lacoste

So setzen Sie die Standardpython -Version Linux fest

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.<version you dont want default> 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.<version# you want default (ex:3.6)> 2

sudo update-alternatives --config python
Agrius

So ändern Sie die Python -Version

sudo update-alternatives --config python3 #Omar
Smoggy Snake

Ähnliche Antworten wie “Ändern Sie die Standard -Python -Version”

Fragen ähnlich wie “Ändern Sie die Standard -Python -Version”

Weitere verwandte Antworten zu “Ändern Sie die Standard -Python -Version” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen