I experience a following contradictory problem with pyenv:
$ pyenv global python2.7.10
pyenv: version `python2.7.10' not installed
$ pyenv install 2.7.10
pyenv: /Users/xeli/.pyenv/versions/2.7.10 already exists
continue with installation? (y/N)
Also:
$ python2.7
pyenv: python2.7: command not found
The `python2.7' command exists in these Python versions:
2.7.10
The shims are on the PATH as required:
$ echo $PATH
/Users/xeli/.pyenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
Nothing suspicious in the shims directory:
$ ls ~/.pyenv/shims | grep python2
ipython2
python2
python2-config
python2.6
python2.6-config
python2.7
python2.7-config
In my .profile
I have:
export PYENV_ROOT=~/.pyenv
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
Therefore pyenv should be initialized at startup.
I cannot figure out how to solve this. Any ideas?
~/.python-version
? – Emphasize