Skip to content

Instantly share code, notes, and snippets.

@maximlt
maximlt / run_python_script_in_conda_env.bat
Last active April 1, 2024 06:23
Run a Python script in a conda environment from a batch file
@echo OFF
rem How to run a Python script in a given conda environment from a batch file.
rem It doesn't require:
rem - conda to be in the PATH
rem - cmd.exe to be initialized with conda init
rem Define here the path to your conda installation
set CONDAPATH=C:\ProgramData\Miniconda3
rem Define here the name of the environment