I can't figure out why pyenv
(installed via homebrew) doesn't seem to work.
It seems like my $PATH
variable isn't updated correctly by pyenv and therefore none of the interpreters installed via pyenv can be found. For example, for python version 3.6.8:
$ pyenv versions
system
* 3.4.10 (set by /Users/cglacet/.pyenv/version)
* 3.5.7 (set by /Users/cglacet/.pyenv/version)
* 3.6.8 (set by /Users/cglacet/.pyenv/version)
* 3.7.3 (set by /Users/cglacet/.pyenv/version)
* 3.8-dev (set by /Users/cglacet/.pyenv/version)
$ pyenv which python3.6
/Users/cglacet/.pyenv/versions/3.6.8/bin/python3.6
$ $(pyenv which python3.6) --version
Python 3.6.8
$ pyenv shell
pyenv: no shell-specific version configured
$ pyenv local
pyenv: no local version configured for this directory
Up until here everything looks just fine, but:
$ python3.6 --version
-bash: python3.6: command not found
$ python --version
Python 3.7.0
If I check my PATH
environment variable, I can't see any path of the form /Users/cglacet/.pyenv/versions/3.x.x/bin
.
Note that 3.7.0
is the python version I had before installing pyenv (the system one). What I expect is to have 3.6
available (all versions installed via pyenv), which should be the case as I activated it as a global interpreter as shown before. The expected behavior is:
$ python3.6 --version
Python 3.6.8