[PYTHON] [Note] Setting .bash_profile after installing pyenv

Introduction

I couldn't find a solution even if I googled, so I will leave it as a reminder I hope it helps people who have stopped doing the same thing.

Event

I installed pyenv and switched the version from pyenv to anaconda etc. installed together, but the version of python did not change

Coping

The following settings were required in .bash_profile

reference Introduction to python-Summary from python3 series

before

$ python --version
Python 2.7.10

.bash_profile settings

$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
$ source .bash_profile

after

$ python --version
Python 3.5.2 :: Anaconda 4.2.0 (x86_64)

Recommended Posts

[Note] Setting .bash_profile after installing pyenv
pyenv note
After installing Linux
Installing pyenv on ubuntu 16.04
[Python] Anaconda, pyenv, virtualenv, .bash_profile