I have a combination of this two questions on stackoverflow: How do I update a Python virtual environment with `venv` (in Python 3.3+) to use a newer version of Python?
Currently, I have a virtual enviornment with the interpreter python 3.7.0
in visual studio code
and I want to upgrade it to python 3.9.0
. So for that I do the following line in the terminal (as mentioned in the first question):
python3.9 -m venv --upgrade
Then I am running in the error of the second question:
PS C:\Users\admin\Documents\Visual Studio 2017\Forecasts> python3.9 -m venv --upgrade python3.9 : The term 'python3.9' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
- python3.9 -m venv --upgrade
- CategoryInfo : ObjectNotFound: (python3.9:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
what I am doing wrong here?
My python executers are stored in: C:\Users\admin\AppData\Local\Programs\Python\Python39