Table of ContentsSteps to use different Python version to setup Python virtual environment Docs virtualenv docs virtualenv pypi # Linux pip install virtualenv virtualenv venv --python=/usr/local/bin/python virtualenv venv --python=/usr/local/bin/python3 # Windows ## Method 1 - I don't recommend to use virtualenv as it will have some missing files pip install virtualenv virtualenv venv -p `which python` virtualenv venv -p `which python3` virtual venv -p "C:\Users\karchunt\AppData\Local\Programs\Python\Python312\python.exe" ## Method 2 "C:\Users\karchunt\AppData\Local\Programs\Python\Python312\python.exe" -m venv venvWritten byKarChunTAtFri Mar 28 2025Share Post