How to switch between different python version on MacOS using pyenv

Veröffentlicht am: 05 Januar 2025
auf dem Kanal: 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


Auf dieser Seite können Sie das Online-Video How to switch between different python version on MacOS using pyenv mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Open Source Hustle 05 Januar 2025 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 708 Mal angesehen und es wurde von 15 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!