Last active
February 1, 2018 04:23
-
-
Save msr1k/1ccf78f92486c1318bd6679ac723e8f8 to your computer and use it in GitHub Desktop.
Example batch file which invokes anaconda prompt and execute python script (Windows)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@FOR /F "delims=" %%i IN ('@call "C:\Users\%USERNAME%\AppData\Local\Continuum\Anaconda3\Scripts\conda.exe" ..activate "cmd.exe" %1') DO @SET "NEW_PATH=%%i" | |
@SET PATH=%NEW_PATH%;%PATH% | |
python %2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@cd /d %~dp0 | |
@if not EXIST anaenv ( | |
@echo Please create anaenv file which written your anaconda environment name | |
@pause | |
@exit 1 | |
) | |
@set /p ANAENV=<anaenv | |
@cmd.exe /K anapy.bat %ANAENV% Application.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment