** SOLVED ** (see second post)
Hi guys, not sure what I've done but things aren't working as before.
pyenv global does not change the default python interpreter as it did before.
here's my setup:
pyenv 2.3.27 installed via brew
bob@Roberts-Mac-mini ~ % pyenv versions
system
* 2.7.18 (set by /Users/bob/.python-version)
3.10.13
3.11.5
bob@Roberts-Mac-mini ~ % pyenv global 3.10.13
bob@Roberts-Mac-mini ~ % pyenv versions
system
* 2.7.18 (set by /Users/bob/.python-version)
3.10.13
3.11.5
of course the latter should be pointing to 3.10.13
bob@Roberts-Mac-mini ~ % python3 --version
Python 3.11.5
bob@Roberts-Mac-mini ~ % python --version
Python 2.7.18
bob@Roberts-Mac-mini ~ % cat .zshrc
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
export PATH="$PYENV_ROOT/shims:$PATH"
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
export PATH="/opt/homebrew/bin:$PATH"
(.zprofile is the same and when it is sourced gives an error on lines 3 and 4:
Last login: Mon Sep 25 09:40:16 on ttys019
/Users/bob/.zprofile:3: command not found: pyenv
/Users/bob/.zprofile:4: command not found: pyenv
bob@Roberts-Mac-mini ~ % env (deleted unrelated lines and removed a few unrelated paths)
PATH=/Users/bob/opt/miniconda3/bin:/opt/homebrew/bin:/opt/homebrew/opt/openjdk/bin:/Users/bob/.pyenv/shims:/Users/bob/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/opt/openjdk/bin:/Users/bob/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
HOME=/Users/bob
PWD=/Users/bob
SHELL=/bin/zsh
SHLVL=1
OLDPWD=/Users/bob
PYENV_ROOT=/Users/bob/.pyenv
PYENV_SHELL=zsh
_=/usr/bin/env
I see some paths unnecessarily repeated and no idea why.
Can any eagle eyed developer understand why pyenv is not working as expected? Thanks in advance
Hi guys, not sure what I've done but things aren't working as before.
pyenv global does not change the default python interpreter as it did before.
here's my setup:
pyenv 2.3.27 installed via brew
bob@Roberts-Mac-mini ~ % pyenv versions
system
* 2.7.18 (set by /Users/bob/.python-version)
3.10.13
3.11.5
bob@Roberts-Mac-mini ~ % pyenv global 3.10.13
bob@Roberts-Mac-mini ~ % pyenv versions
system
* 2.7.18 (set by /Users/bob/.python-version)
3.10.13
3.11.5
of course the latter should be pointing to 3.10.13
bob@Roberts-Mac-mini ~ % python3 --version
Python 3.11.5
bob@Roberts-Mac-mini ~ % python --version
Python 2.7.18
bob@Roberts-Mac-mini ~ % cat .zshrc
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
export PATH="$PYENV_ROOT/shims:$PATH"
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
export PATH="/opt/homebrew/bin:$PATH"
(.zprofile is the same and when it is sourced gives an error on lines 3 and 4:
Last login: Mon Sep 25 09:40:16 on ttys019
/Users/bob/.zprofile:3: command not found: pyenv
/Users/bob/.zprofile:4: command not found: pyenv
bob@Roberts-Mac-mini ~ % env (deleted unrelated lines and removed a few unrelated paths)
PATH=/Users/bob/opt/miniconda3/bin:/opt/homebrew/bin:/opt/homebrew/opt/openjdk/bin:/Users/bob/.pyenv/shims:/Users/bob/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/opt/openjdk/bin:/Users/bob/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
HOME=/Users/bob
PWD=/Users/bob
SHELL=/bin/zsh
SHLVL=1
OLDPWD=/Users/bob
PYENV_ROOT=/Users/bob/.pyenv
PYENV_SHELL=zsh
_=/usr/bin/env
I see some paths unnecessarily repeated and no idea why.
Can any eagle eyed developer understand why pyenv is not working as expected? Thanks in advance
Last edited: