Since it was necessary to operate with Python 3 for environment construction, I will summarize how to switch from the existing Python version.
$ python --version
Python 2.7.16
Python is originally installed. But the version is not the latest. Depending on the environment, it may be necessary to change the version.
To install the new version, install from Official Site. Once you have completed the installation steps, the next step is.
$ pyenv global 3.8.1
$ eval "$(pyenv init -)"
$ python --version
Python 3.8.1
global means to reflect in the whole. local reflects the version specified in the current directory. This time, I specified global because it will be reflected in the whole.
$ python --version
Python 3.8.1
You can see that it is reflected properly, this completes the version switching.
I have summarized it because it may be necessary to build an environment similar to working in a virtual environment. The article "Changing the python version with pyenv" explains the version switching more carefully.
"Change python version with pyenv" https://qiita.com/Kohey222/items/19eb9b3cbcec9b176625
Recommended Posts