I’m a bit old-school and like to grab code examples on my laptop and run them rather than spinning up codespaces etc. I’ve been using a lot more Python bits lately playing with various AI tools and eventually you hit the problem where some things need different versions.
More for future me than anything else, I’ve found pyenv-windows the easiest to quickly change between projects.
The instructions on their github page are very good so I won’t repeat them – just go straight to the source here.
The couple of commands I find handy and never retain are:
- installing: pyenv install xxxxx
- Setting the global (default) version: pyenv global xxxxx
- Setting the local version (for the folder you’re in): pyenv local xxxx
- See what you have installed: pyenv versions