Install and Manage Multiple Python Versions on Windows
How to Install and Manage Multiple Python Versions on Windows 10, or 11.
Assuming you have installed both Python 3.10 and Python 3.11 (with default settings) on this computer.
1. Open Powershell
2. cd $HOME\appdata\local\programs\python
3. copy python311\python.exe python311\python311.exe
4. copy python310\python.exe python310\python310.exe
5. Environment variables setup
Windows (logo) key, type "env" in the search bar -> Edit the system environment (Control panel)
-> Environment Variables -> User variables for your_user_name -> Path
Add below paths to the Path:
- C:\Users\12506\AppData\Local\Programs\Python\Python311\Scripts\
- C:\Users\12506\AppData\Local\Programs\Python\Python311\
- C:\Users\12506\AppData\Local\Programs\Python\Python310\Scripts\
- C:\Users\12506\AppData\Local\Programs\Python\Python310\
Move up which ever version to the top and that version of Python will be currently selected as the default version
6. Run python --version, python310 --version, and python311 --version & test each
7. Run python -m pip list, python310 -m pip install, and python311 -m pip install to avoid the mixing up of pips
Share this post
Related Posts
UV
UV unified Python package manager: Rust-based replacement for pip, venv, pip-tools, developed by Astral (Ruff).
Precedence of Logical Operators
Logical operator precedence: NOT (highest), AND (medium), OR (lowest) with Python code examples showing order.
Offline Python Packages Installation
Offline Python package installation: download dependencies with pip, transfer and install without internet.
4 Ways of Serving Static Files in Django
Four Django static file serving methods: dev server, Whitenoise, Nginx, and Amazon S3 cloud storage comparison.