It's a simple script and is supposed to start my python program in the same directory. However, it just runs and closes in a blink.
activate base
python CustomGUI.pyw
pause
Apparently, it's the activate base
command which is being an issue. The command window just closes without activating the base environment.
For running python program using virtualenv
you don't need to activate it. You can directly use interpreter in the environment.
run_gui.bat
C:\path\to\env\scripts\python CustomGUI.pyw
Pause
Will work just fine. For Windows 10 with Anaconda3 and username “jsmith”– the path will be C:\\Users\\jsmith\\Anaconda3\\python
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.