I used pyenv to update python from 2 to 3.
After that, the Path was set with the following command.
$ export PATH="/home/{{user name}}/.pyenv/bin:$PATH"
$ eval "$(pyenv init -)"
$ eval "$(pyenv virtualenv-init -)"
$ python --version
Python 3.7.6
However, if I erase the terminal that is currently open and restart it,
$ python --version
Python 2.7.6
And the python version has returned to 2.
** Edit /.bashrc to run commands automatically on reboot **
$ vi ~/.bashrc
Open the bashrc file and edit it.
In any place,
export PATH="/home/{{user name}}/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
If you add ok
Recommended Posts