Faites la bonne chose, faites la bonne chose!
---> Zéro Ouvrez votre terminal,
- Premièrement python -V, cela montre probablement:
Python 2.7.10
-Deuxièmement python3 -V, cela montre probablement:
Python 3.7.2
- Troisièmement entrée where pythonou which python, cela montre probablement:
/usr/bin/python
--- Quatrièmement, entrez where python3ou which python3, cela montre probablement:
/usr/local/bin/python3
--Cinquièmement, ajoutez la ligne suivante en bas de votre fichier de variable d'environnement PATH ~/.profile file or ~/.bash_profilesous Bash ou ~/.zshrcsous zsh.
alias python='/usr/local/bin/python3'
OU
alias python=python3
-Sixième entrée source ~/.bash_profilesous Bash ou source ~/.zshrcsous zsh.
- Septièmement, quittez le terminal.
--- Huitièmement, ouvrez votre terminal et entrez python -V, cela montre probablement:
Python 3.7.2
J'avais réussi à l'essayer.
D'autres, le ~/.bash_profilesous zsh n'est pas ça ~/.bash_profile.
La variable d'environnement PATH sous zsh à la place ~/.profile(ou ~/.bash_file) via ~/.zshrc.
Aidez-vous les gars!