Skip to content

Instantly share code, notes, and snippets.

@knu2xs
Created September 28, 2021 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save knu2xs/0bd5a714396811ef6aeb79c6dbe18dbd to your computer and use it in GitHub Desktop.
Save knu2xs/0bd5a714396811ef6aeb79c6dbe18dbd to your computer and use it in GitHub Desktop.
Example conda environment file with PyDOBC

Create ArcGIS Environment

  • Start > ArcGIS > Right Click Python Command Prompt > Run as Administrator
  • conda create -f environment.yml
  • Go to lunch...

Call Scripts Using Environment Manually

  • Start > ArcGIS > Python Command Prompt
> activate arcgis
> python -m script_name.py

Call Scripts as Scheduled Tasks

Add Conda Path to System PATH

  • If Pro in standard install location, run Command Prompt as Adminstrator and setx path "%PATH%;C:\Program Files\ArcGIS\Pro\bin\Python\Scripts"
  • Call conda run -n arcgis python script_name.py in Scheduled Task

Call Conda Directly

  • Call "C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\conda.exe" run -n arcgis python script_name.py
name: arcgis
channels:
- esri
- conda-forge
dependencies:
- arcgis
- arcpy
- jupyterlab
- nodejs
- pip
- pyodbc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment