[PYTHON] Do not switch with pyenv global!

pyenv global hoge

Even so, the python version did not switch and I wrestled for about an hour. I'm probably the only one who is addicted to this, but I couldn't find such a stupid case even if I googled, so I'll leave it for the time being.

First, pyenv itself is in the home directory, properly in the path.

Install anaconda3 series with pyenv,

pyenv global hoge

When I tried to switch with, it did not switch. Many of the reasons why it doesn't switch are when python refers to the guy on the system.

which python

Confirm with. No problem, going through ~ / .pyenv. Then why doesn't it switch?

First of all, select the version of pyenv

pyenv shell

The PYENV_VERSION environment variable set in. next,

pyenv local

A .python-version file in the current directory that can be set with. next,

pyenv global

A ~ / .pyenv / version file that can be set with. If you don't have everything, system python.

Yes, there was a .python-version file in my home directory for some reason ... I didn't notice it at all ... when did I do it ...?

rm ~/.python-version

Then it was solved ...

Recommended Posts

Do not switch with pyenv global!
Check when the version does not switch with pyenv
Easily switch pyenv virtualenvs with peco
What to do if pyenv install does not proceed with an error
Do Houdini with Python3! !! !!
Install python with pyenv
Build python3.x with pyenv
What to do if Python does not switch from the System version in pyenv
Do not omit __init__.py
What to do if pyenv is not enabled (zsh)
Do not learn with machine learning library TensorFlow ~ Fibonacci sequence
Record global IP with python
Do Django with CodeStar (Python3.8, Django2.1.15)
How to unlock pyenv global
General-purpose global optimization with Z3
Python version does not switch
Reinstall python with pyenv with -fPIC
Do AES encryption with DJango
Switch python to 2.7 with alternatives
Let's do R-CNN with Sklearn-theano
python with pyenv and venv
Switch virtual environment with jupyter
Do something fuzzing with acceptableRegex.py
Do multi-stage SSH with Fabric