I created a venv in python. In CMD I can execute it with
PythonpyenvScriptsactivate
and run my Scripts after that
python example.py
But how do I do it automatically in Visual Studio Code? If I press F5 or CTRL+F5 VSC tries to run another Python version but not my venv. In settings.json
I have path to my venv:
{
"python.pythonPath": "Python\pyver\py391\python.exe"
}
I need to write somewhere in my setting the PythonpyenvScriptsactivate
and execute it with python
like Anaconda is doing it. I can see in my terminal if I press F5 with Anaconda it runs firstpathoScriptsactivate
and after that it activade conda base
and runs the python script. How do I set my setting like in Anaconda?
Thank you in advance :)
question from:
https://stackoverflow.com/questions/65873338/visual-studio-code-run-venv-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…