How to switch between different python version on MacOS using pyenv

Publicado el: 05 enero 2025
en el canal de: Open Source Hustle
708
15

00:00 Introduction
00:30 pyenv installation
00:52 pyenv shell configuration
01:42 Listing pyenv version
02:02 Installing additional python versions
02:40 Switching between different python versions
03:50 Create a virtual environment with a specific python version
04:17 Solution if you are unable to switch between python versions
04:28 Solution if pyenv global command is not working

Easily switch between multiple python versions using pyenv. I personally use this method to create virtual environment with specific python versions for various development environments.

If you face issues with switching between python environments you can add the bellow line to .zshrc file which might fix the issue:
'eval "$(pyenv init --path)"'

If you are unable to switch between python environments using pyenv global command consider removing .python-version file located in your home directory which might resolve the issue:
rm .python-version

Below are the links to the solutions mentioned above:
https://www.reddit.com/r/learnpython/...
https://github.com/pyenv/pyenv/issues...

Linkedin:
  / open-source-hustle  

You can find articles and written formats of my youtube tutorials on my website:
opensourcehustle.com


En esta página del sitio puede ver el video en línea How to switch between different python version on MacOS using pyenv de Duración hora minuto segunda en buena calidad , que subió el usuario Open Source Hustle 05 enero 2025, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 708 veces y le gustó 15 a los espectadores. Disfruta viendo!