Fai la cosa giusta, fai la cosa giusta!
---> Zero Apri il tuo terminale,
- Primo input python -V
, probabilmente mostra:
Python 2.7.10
-In secondo luogo python3 -V
, probabilmente mostra:
Python 3.7.2
- Terzo input where python
o which python
, probabilmente mostra:
/usr/bin/python
--- Quarto input where python3
o which python3
, probabilmente mostra:
/usr/local/bin/python3
- In quinto luogo aggiungi la seguente riga nella parte inferiore del tuo file della variabile d'ambiente PATH in ~/.profile file or ~/.bash_profile
Bash o ~/.zshrc
in zsh.
alias python='/usr/local/bin/python3'
O
alias python=python3
-Sesto input source ~/.bash_profile
sotto Bash o source ~/.zshrc
sotto zsh.
Settimo Esci dal terminale.
--- Ottavo Apri il tuo terminale e inserisci python -V
, probabilmente mostra:
Python 3.7.2
Avevo fatto con successo provarlo.
Altri, il ~/.bash_profile
sotto zsh non è quello ~/.bash_profile
.
La variabile d'ambiente PATH sotto zsh invece ~/.profile
(o ~/.bash_file
) tramite ~/.zshrc
.
Aiutatevi ragazzi!