Vorrei usare pyenv per passare a python2 e python3.Impossibile passare a Python con pyenv
Ho scaricato con successo python2 e python3 e pyenv con i seguenti codici.
brew install pyenv
brew install pyenv-virtualenv
pyenv install 2.7.10
pyenv install 3.5.0
Tuttavia, non posso passare da python2 a python3 ..
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$
non capisco il motivo per cui questo accade.
Per vostra informazione. Il mio pitone si trova in questa directory.
Soma-Suzuki:~ Soma$ which python
/usr/bin/python
Grazie in anticipo.
È sufficiente modificare il file .bashrc. Crea alias python = Python3.5.0 –