Continuing from the above, I may not be accustomed to markdown, macOS, and CUI operations yet. There may be etiquette violations, but I would appreciate it if you could comment with warm kindness. It will be a really rudimentary content (memo writing).
macOS Catalina version 10.15.7
Put pyenv on mac at command line (terminal), Install multiple pythons via pyenv so that you can switch between them according to your needs.
I got caught a little, but I was able to complete it without any problems by restarting the terminal.
While saying that, the work itself has already been completed, so I was confused by some part of the beginner, so I will leave only a memo as a memorandum.
Basically, I referred to this Qiita article. It was easy to understand and was very helpful, thank you. .. ..
Originally, there was no problem personally if python of ver3.xx was included, but The main function of pyenv is that it can be switched freely. I installed python 2.7.16, which was included in mac by default on a trial basis, and 3.9.0, which I want to use newly, with pyenv.
The command is:
pyenv install 2.7.16
pyenv install 3.9.0
With the following command, you can confirm that two versions of python are installed without any problem,
pyenv versions
The following command should have specified the version of python to use by default,
pyenv global 3.9.0
python --version
Even if I checked the version above, it was still 2.7.16. .. ..
When I searched for a solution on google, I found an article like this. You can solve it here!
Even if you check / etc / paths
with excitement, there seems to be no problem ...
A few minutes to wonder why.
I thought ** Restart the terminal **.
It was switching without any problem.
Gununu ... I'm surprised to overlook it.
I will continue to be careful.
Recommended Posts