Ich möchte Pyenv verwenden, um Python2 und Python3 zu wechseln.Kann Python mit Pyenv nicht wechseln
Ich habe erfolgreich Python2 und Python3 und Pyenv mit folgenden Codes heruntergeladen.
brew install pyenv
brew install pyenv-virtualenv
pyenv install 2.7.10
pyenv install 3.5.0
Allerdings kann ich nicht von python2 zu python3 wechseln ..
Soma-Suzuki:~ Soma$ python --version
Python 2.7.10
Soma-Suzuki:~ Soma$ pyenv global
2.7.10
Soma-Suzuki:~ Soma$ pyenv versions
system
* 2.7.10 (set by /Users/Soma/.pyenv/version)
3.5.0
Soma-Suzuki:~ Soma$ pyenv global 3.5.0
Soma-Suzuki:~ Soma$ pyenv global
3.5.0
Soma-Suzuki:~ Soma$ pyenv versions
system
2.7.10
* 3.5.0 (set by /Users/Soma/.pyenv/version)
Soma-Suzuki:~ Soma$ python --version
Python 2.7.10
Soma-Suzuki:~ Soma$
Ich verstehe nicht, warum dies geschieht.
Zu Ihrer Information. Mein Python befindet sich in diesem Verzeichnis.
Soma-Suzuki:~ Soma$ which python
/usr/bin/python
Vielen Dank im Voraus.
Sie können nur Ihre .bashrc-Datei bearbeiten. Machen Sie alias python = Python 3.5.0 –