“Zmień domyślną wersję Python” Kod odpowiedzi

Jak zmienić wersję Python w 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

Zmień domyślną wersję Python

sudo update-alternatives --config python
Sjk-Lacoste

Jak ustawić domyślną wersję Python Linux

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

Jak zmienić wersję Python

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

Odpowiedzi podobne do “Zmień domyślną wersję Python”

Pytania podobne do “Zmień domyślną wersję Python”

Więcej pokrewnych odpowiedzi na “Zmień domyślną wersję Python” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu