Does anyone know how to run python script with python from virtual environment without cmd. In Linux it is easy with shebang.
Problem is that I have installed Python2 and on MyProject I have created virtual environment in Python3. Now when I click on main.py in MyProject I get syntax error and that is normal because it calls Python2 and in main.py I use async def that in Python2 doesn't exist.
What I must add in main.py so that it automatically recognises that it should be executed by python3 located in virtual environment and not with windows assigned default python2.
I don’t want to use cmd and I want all in main.py that is needed to run that py on click.
Any ideas?