Hello, I have a question.
To run the program now, turn on the virtual environment in cmd, go to the appropriate folder path, and then python run.The program runs only when you run py.
We found the os module and subprocess module while looking for commands that can be used to virtualize, file paths, and execute, such as typing this directly into cmd within the Python code.
This was different from the direction I thought was using the result executed in the shell.
Is there any way to run cmd with Python command so that it is automatically entered here?
Or is there any other way?
Thank you for your reply.
python cmd py
After determining the Python location of the virtual environment,
d:\envs\envtf\script\python.exe d:\dev\myproj\src\run.py
I think this is the easiest way to do it.
© 2024 OneMinuteCode. All rights reserved.