0
ishandutta2007@MacBook-Pro:~$ python --version
Python 2.7.15
 ishandutta2007@MacBook-Pro:~$ pyenv versions
  system
  2.7
* 3.7.0 (set by /Users/ishandutta2007/.pyenv/version)
 ishandutta2007@MacBook-Pro:~$ pyenv global 3.7.0
 ishandutta2007@MacBook-Pro:~$ pyenv versions
  system
  2.7
* 3.7.0 (set by /Users/ishandutta2007/.pyenv/version)
ishandutta2007@MacBook-Pro:~$ python --version
Python 2.7.15
ishandutta2007@MacBook-Pro:~$ python
Python 2.7.15 (default, Jun 17 2018, 12:46:58) 
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
ishandutta2007
  • 16,676
  • 16
  • 93
  • 129

2 Answers2

1

you need to add:

eval "$(pyenv init -)" 

in your .bash_profile or .bashrc

dilkash
  • 562
  • 3
  • 15
0

The issue was I needed to add this in my bash_profile

if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
fi
ishandutta2007
  • 16,676
  • 16
  • 93
  • 129