I've set up a few Python projects recently and I needed to create each time a virtual environment with a specific Python version on Windows.
Python virtual environment with specific version on Windows
problem
solution
Each time I ended up googling and getting to this Stack Overflow question: https://stackoverflow.com/questions/1534210/use-different-python-version-with-virtualenv
The answer for Windows is there somewhere in comments, but it's hard to find, so here it is in plain sight:
py -3.12 -m venv my_env_name
Author: Dan Dumitru
Last Edit:
December 10, 2024
Last Edit | December 10, 2024 |
Created | December 10, 2024 |
Views | 11 |
Tags |
Python
|
Other Python Posts
Join in!
I'm building here a library of useful solutions to software development problems.
If you like this project, create an account or add a bookmark, then come back here to write a post yourself when you run into something that might be useful to others...
>> read moreYour Comment
Feel free to post additional info or improvement suggestions.