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
which pyenv
andwhich python
? – Budworthpyenv init
or otherwise set it up according to instructions. We can't tell you what's wrong with your installation because you haven't provided an MCVE. "I'll update the title as soon as I'll have a vague idea of what is going on." SO is not a personal help site. It is a documentation site. This is something you need to complete before you post. – Evadeshims
manually in my bash profile. – Refusal@
syntax to reply; otherwise, the other party is not notified. It sounds like you're not familiar with how Linux systems work. bashrc is a script that gets automatically executed when a user launches a new instance of bash. .bash_profile and .profile are similar but not exactly the same. (They're all invoked under different conditions.) There is no global registry of environment variables like in Windows. Look into how to make changes to environment variables permanent for more details. – Evade