What to do if you installed pyenv on Mac OS using Homebrew but the python version doesn't switch

problem

I installed pyenv using Homebrew (package management tool) on mac os and set the python version to global, but the python version does not switch.


$ brew install pyenv #Install pyenv
$ pyenv install 3.8.0 #Install python version
$ pyenv global 3.8.0 #Set python version to global
$ python -V #Check version
2.7.7 #Problems that are the same as the default version

Solution

Add eval "$ (pyenv init-)" to .bash_profile or .zshrc in your home directory and adapt with the source command.

$ vim .zshrc
$ source .zshrc

Recommended Posts

What to do if you installed pyenv on Mac OS using Homebrew but the python version doesn't switch
What to do if Python does not switch from the System version in pyenv
How to install and use pyenv, what to do if you can't switch python versions
What to do if you get the error ʻERR_FEATURE_UNAVAILABLE_ON_PLATFORM` when using ts-node-dev on Linux
What to do if Python doesn't work on Git for Windows
What to do if PyAudio cannot be installed on Python 3.7, 3.8, 3.9 on Windows
What to do if the server doesn't start with python manage.py runserver
Notes on setting pyenv and python environment using Homebrew on Mac OS Marvericks
What to do if you get an error like'Qstring' has already been set to version 1 using mne python
What to do if you get a "Wrong Python Platform" warning when using Python with the NetBeans IDE
What to do if scrapy doesn't work after installing scrapy with pip on mac
What to do if you get an error when installing python with pyenv
What to do if you get "Python not configured." Using PyDev in Eclipse
What to do if you get the message "" ~ .pkg "is corrupted and cannot be opened" when installing wxPython on Mac OS X
mac OS X 10.15.x pyenv Python If you can't install
What to do if you get an error when importing matplotlib in Python (Mac)
What to do if you can't hit the arrow keys in the Python interactive console
What to do if `pip install matplotlib` fails on Mac
What to do if you can't use WiFi on Linux
[* CentOS 6.10] What to do if you cannot add the IUS Community Project repository on CentOS 6.5 (VirtualBox)
What to do if the library doesn't load when you run it in PyCharm, even though it works fine on terminal
What to do if you get a minus zero in Python
I want to know if you install Python on Mac ・ Iroha
What to do if the inode is exhausted on EC2 Linux
What to do if you can't use the trash in Lubuntu 18.04.
How to install Theano on Mac OS X 10.10 (using pyenv, anaconda)
What to do if grep: empty (sub) expression appears on Mac grep
What to do if you get "The session could not be opened" when installing CentOS on VirtualBox
What to do if the Pipenv environment is corrupted by updating Homebrew
[Mac OS] What to do when Python is not installed as a framework. Is displayed when import matplotlib is performed.
What to do if you can't use scikit grid search in Python
What to do if you have installed PyCharm but shortcut keys such as `control + e` do not work
What to do if you forget your login password on Manjaro Linux
What to do if you get stuck during Anaconda installation on Linux
Try using n to downgrade the version of Node.js you have installed
[Python] What to do if you get a ModuleNotFoundError when importing pandas using Jupyter Notebook in Anaconda
What to do if you get the error Target WSGI script'/var/www/xxx/xxx.wsgi' cannot be loaded as python module
What to do if you get the error RuntimeError: Python is not installed as a framework when trying to use matplitlib and pylab in Python 3.3
[2015/11/19] How to register a service locally using the python SDK on naoqi os
Let's Encrypt updated! What to do if the certbot renew command doesn't work
What to do if a version error occurs in the selenium Chrome driver
What to do if Japanese language support is not completely installed on Ubuntu 16.04
What to do if (base) is displayed at the beginning of the Mac terminal
What to do if you can't pipenv shell
What to do if rails s doesn't work
What to do if pip cannot be installed
What to do if atom autocomplete-python doesn't work
What to do if you get the error "Error: opencv3: Does not support building both Python 2 and 3 wrappers" when installing openCV 3
What to do if "export" keeps appearing on terminal when trying to put Python on macOS
What to do if you get `No kernel for language python found` in Hydrogen
What to do if the print command itself causes an error in Maya python
What to do if the progress bar is not displayed in tqdm of python
What to do if Python IntelliSense is not displayed in VS Code on Windows
What to do if you don't want to use Japanese column names when using ortoolpy.logistics_network
Steps to use the AWS command line interface (Python / awscli) on Mac OS X
What to do if you run python in IntelliJ and end with an error
What to do if you can't pip install mysqlclient
No module named What to do if you get'libs.resources'
How to auto-submit Microsoft Forms using python (Mac version)
Steps to install the latest Python on your Mac
What to do if SciPy installation fails on CentOS