What to do if Python does not switch from the System version in pyenv

What to do if you should have switched the Python version with pyenv but it doesn't.

$ which python
/usr/bin

In that case, Python is installed by default / usr / bin has a higher priority than / usr / local where pyenv is installed.

$ vim /etc/paths

/usr/bin
/bin
/usr/local/bin
/usr/sbin
/sbin
/usr/local/sbin

To

/usr/local/bin
/usr/bin
/bin
/usr/local/sbin
/usr/sbin
/sbin

Raise the priority of / usr / local / ~.

$ which python
/usr/local/bin/pyenv

Should be.

If it still does not switch, Should have been set in ~ / .bash_profile

eval "$(pyenv init -)"

It seems that is not running, so let's hit it directly in the terminal. It may not be executed when the terminal is opened for some reason. (Sorry, the shell word is refreshing) → (Addition) It will be executed properly just by commenting in ~ / .bash_profile (programmer's waste!)

Recommended Posts

What to do if Python does not switch from the System version in pyenv
What to do if the progress bar is not displayed in tqdm of python
What to do if you installed pyenv on Mac OS using Homebrew but the python version doesn't switch
Change the active version in Pyenv from anaconda to plain Python
What to do if pyenv install does not proceed with an error
What to do if the user name is changed and the pyenv library path does not pass
Python version does not switch
Check when the version does not switch with pyenv
What to do if sys / cdefs.h does not exist
What to do if pyenv is not enabled (zsh)
What to do if you get "Python not configured." Using PyDev in Eclipse
Examples and solutions that the Python version specified in pyenv does not run
What to do if a version error occurs in the selenium Chrome driver
What to do if ʻarguments [0] .scrollIntoView ();` fails in python selenium
What to do if the print command itself causes an error in Maya python
What to do if Python IntelliSense is not displayed in VS Code on Windows
What to do when Python starts up in Anaconda does not come out unexpectedly
How to install and use pyenv, what to do if you can't switch python versions
What to do if you can't hit the arrow keys in the Python interactive console
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 Jupyter Notebook on WSL does not start automatically in your browser
What to do if you get a minus zero in Python
What to do if python says "fatal error:'stdio.h' file not found"
What to do when the value type is ambiguous in Python?
[VSCode] unable to import'google.cloud' What to do when pylint (import-error) does not recognize the Python import statement
What to do if there is a decimal in python json .dumps
What to do if you can't use scikit grid search in Python
python> does not include the letters mm> if "mm" not in text: / print "not including mm"
What to do if No Python documentation found for ... appears in pydoc
What to do if the server doesn't start with python manage.py runserver
What to do if you get `locale.Error: unsupported locale setting` when getting the day of the week from a date in Python
What to do if pipreqs results in UnicodeDecodeError
What to do to get google spreadsheet in python
[Python] What to do when PEP8 is violated in the process of importing from the directory added to sys.path
Even if the development language is changed to python3 in Cloud9, version 2 is displayed in python --version
[Python] What to do if an error occurs in pip (pyinstaller, pyautogui, etc.)
Example of what to do when the sample script does not work (OpenCV-Python)
What to do if a Unicode Encode Error occurs in Sublime Text Python
What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
What to do if a UnicodeDecodeError occurs in pip
To do the equivalent of Ruby's ObjectSpace._id2ref in Python
What does the last () in a function mean in Python?
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
What to do if you get an OpenSSL error when installing Python 2 with pyenv
What to do when is not in the sudoers file.This incident will be reported.
What to do if the Microsoft Store opens even if you run python on Windows
What to do if you get `No kernel for language python found` in Hydrogen
What to do if you get an error when importing matplotlib in Python (Mac)
What to do if Sort imports get stuck in VS Code's Python Extension (around 2020/09)
What to do if you run python in IntelliJ and end with an error
Switch from python2.7 to python3.6 (centos7)
[python] How to check if the Key exists in the dictionary
What to do if the package dependency cannot be repaired
What to do if pip gives a DistributionError in Homebrew
What to do if you get "coverage unknown" in Coveralls
What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()
What to do when "SSL: CERTIFICATE_VERIFY_FAILED _ssl.c: 1056" appears in Python
What to do if you can't log in as root
What beginners learned from the basics of variables in python
What to do if you get Swagger-codegen in python and Import Error: No module named
The story that the version of python 3.7.7 was not adapted to Heroku