Skip to content

Instantly share code, notes, and snippets.

@Dlory
Dlory / run_python_script_in_conda_env.bat
Created November 21, 2023 09:33 — forked from maximlt/run_python_script_in_conda_env.bat
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