Install pyenv on MacBook Air and switch python to use

Preface

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).

environment

macOS Catalina version 10.15.7

goal

Put pyenv on mac at command line (terminal), Install multiple pythons via pyenv so that you can switch between them according to your needs.

Conclusion

I got caught a little, but I was able to complete it without any problems by restarting the terminal.

Let's start

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

Install pyenv on MacBook Air and switch python to use
How to install and use pandas_datareader [Python]
Install python on xserver to use pip
Install pyenv and Python 3.6.8 on Ubuntu 18.04 LTS
How to install and use pyenv, what to do if you can't switch python versions
Install pyenv on Raspberry Pi and version control Python
How to install Python2.7 python3.5 with pyenv (on RHEL5 CentOS5) (2016 Nov)
Python 3.6 on Windows ... and to Xamarin.
How to install and use Graphviz
Unable to install Python with pyenv
Install Python on CentOS using Pyenv
Steps to install python3 on mac
Install Python on CentOS using pyenv
How to install OpenCV on Cloud9 and run it in Python
Install Ubuntu 18.04 on MacBook Pro Touchbar model and connect to WIFI
How to use python put in pyenv on macOS with PyCall
Steps to install Python environment on Ubuntu
Memorandum on how to use gremlin python
Notes on building Python and pyenv on Mac
python: How to use locals () and globals ()
How to use Python zip and enumerate
How to use is and == in Python
Install pyenv and rbenv on CentOS system-wide
Try to build python and anaconda environment on Mac (by pyenv, conda)
Install and run Python3.5 + NumPy + SciPy on Windows 10
[2020 version] How to install Python3 on AWS EC2
Easy way to use Python 2.7 on Cent OS 6
How to install OpenCV on Jetson Nano Python
How to use Python Kivy ④ ~ Execution on Android ~
Install Python 3.8.6 on macOS Big Sur using pyenv
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
I wanted to install Python 3.4.3 with Homebrew + pyenv
python development environment -use of pyenv and virtualenv-
How to use tkinter with python in pyenv
[Python] How to use hash function and tuple.
How to use Ruby's PyCall to enable pyenv Python
[Python] How to install OpenCV on Anaconda [Windows]
How to install Cascade detector and how to use it
Install MongoDB on Ubuntu 16.04 and operate via python
Install Python and libraries for Python on MacOS Catalina
Install ZIP version Python and pip on Windows 10
I want to use Python in the environment of pyenv + pipenv on Windows 10
Install python on WSL
Install pyenv on mac
How to install Python
Install Python on Pidora.
Install Scrapy on python3
How to install python
Install Python 3 on Mac
Install Python3.4 on CentOS 6.6
Install python (pyenv, pyenv-virtualenv)
Install python on windows
Install Python 2.7.3 on CentOS 5.4
How to use Pyenv
Install python with pyenv
Install Python 3.3 on Ubuntu 12.04
Install Python 3.4 on Mac
Install pyenv on OSX
Install Python 3.6 on Docker
[Python] [Django] How to use ChoiceField and how to add options
Install Python3 on Mac and build environment [Definitive Edition]