https://www.anaconda.com/download
For Powershell:
conda init powershell
For Command Prompt:
conda init cmd.exe
https://stackoverflow.com/questions/64149680/how-can-i-activate-a-conda-environment-from-powershell
:: Activates the default conda environment:
call activate base
:: Executes the script:
python "clean_up_old_sql_files.py" Note that calling conda activate base would not work as the rest of the .bat file would not execute as a new shell has been launched. At least this is the problem I had and using call is the solution.