bat file to run the program into the environment anaconda

Recent work encountered To run anaconda environment program, and deployment.

It needs to run the bat file into the anaconda environment program

by anaconda bat file cmd into the environment
1. Right-click to see anaconda prompt target, part of the back of the copy cmd.exe, not "/ K"
% windir% \ System32 \ cmd.exe "/ K" C: \ ProgramData \ Anaconda3 \ Scripts \ activate.bat C: \ ProgramData \ Anaconda3
2. write bat file
EG:
# act_hello.py
the CALL C: \ ProgramData \ Anaconda3 \ Scripts \ activate.bat C: \ ProgramData \ Anaconda3 # 1 in the CALL + copy of part
E: # at this point anaconda has entered the terminal, switch to the directory E
python hello.py # run python script, my python script in the root directory of E

 

Guess you like

Origin www.cnblogs.com/zxr323/p/11243594.html