Managing multiple python versions using pyenv, not working

Hi!

I’m having some trouble using pyenv, to manage python versions.
Here is a paste of the shell-“session” where i show the commands that i have tried to get this working, more detail under the paste.

~ >>> pyenv versions                                                                                                                                                                                                                    [2]
* system (set by /home/matrucious/.pyenv/version)
  3.10.1
  3.8.8
  3.9.9
~ >>> pyenv global 3.10.1                                                                                                                                                                                                                  
~ >>> pyenv versions                                                                                                                                                                                                                       
  system
* 3.10.1 (set by /home/matrucious/.pyenv/version)
  3.8.8
  3.9.9
~ >>> cd nux                                                                                                                                                                                                                               
~/nux >>> pyenv local 3.8.8                                                                                                                                                                                                                
~/nux >>> pyenv versions                                                                                                                                                                                                                   
  system
  3.10.1
* 3.8.8 (set by /home/matrucious/nux/.python-version)
  3.9.9
~/nux >>> python --version                                                                                                                                                                                                                 
Python 3.10.1
~/nux >>> cd ..                                                                                                                                                                                                                            
~ >>> tail -5 .zshrc                                                                                                                                                                                                                       
export PATH="$PYENV_ROOT/bin:$PATH"

if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
fi
~ >>> tail -7 .bashrc                                                                                                                                                                                                                      
## pyenv configs
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"

if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
fi
~ >>> cd nux                                                                                                                                                                                                                               
~/nux >>> pyenv global 3.8.8                                                                                                                                                                                                               
~/nux >>> python --version                                                                                                                                                                                                                 
Python 3.10.1
~/nux >>> pyenv versions                                                                                                                                                                                                                   
  system
  3.10.1
* 3.8.8 (set by /home/matrucious/nux/.python-version)
  3.9.9
~/nux >>> cd ..                                                                                                                                                                                                                            
~ >>> pyenv versions                                                                                                                                                                                                                       
  system
  3.10.1
* 3.8.8 (set by /home/matrucious/.pyenv/version)
  3.9.9
~ >>> python --version                                                                                                                                                                                                                     
Python 3.10.1
~ >>>  

As can be seen in this paste, I have successfully installed pyenv, and a number of python versions using pyenv.
I have also tried using the command sequence

pyenv virtualenv 3.8.8 myenv
pyenv activate myenv

Yet nothing seems to come of this.

Have I missed something, or does something seem to be wrong with my installation?
I installed pyenv using pamac from the official repo.

Any other info that’s needed of me just let me know.
Thanks in advance

Hi,

I had the same issue after the 2022-01-02 update, at least that’s when I noticed it.

Pyenv’s shims directory was not in the PATH (see Here).

I am using Bash and had to configure the shell’s environment for Pyenv using the For Bash case when ~/.bash_profile sources ~/.bashrc
(see second For Bash case Here).

Hope this helps.