Skip to content

A POC to automate tasks and deployment in air gapped environment where need to rely on ArcGIS Pro built in Python.

Notifications You must be signed in to change notification settings

Suizer98/arcpy3-pyinfra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArcPy3 PyInfra

Tech Stacks

Overview

In production environment, we may have encountered where we need to install ArcGIS Pro 3.1.2 with Python 3.9.16 environment in a hardened vm. However, that vm may have limited internet access or package installation restrictions in enterprise environments. This tool allows you to:

  1. Download all required PyInfra packages for Windows Python 3.9.16 using Docker
  2. Transfer the downloaded packages to your ArcGIS Pro VM
  3. Install them offline in a virtual environment
  4. Run automated environment checks with a user-friendly TUI (Text User Interface)

Quick Start

Download Packages

cd arcpy3-pyinfra
docker compose up --build
OR
podman compose up --build

The packages will be downloaded to the ./pyinfra_packages directory.

Install on Windows VM

1. Prepare Virtual Environment

Navigate to your ArcGIS Pro Python environment and create a new virtual environment (using Program Files as example):

C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>python -m venv pyinfra-venv C:\venvs\pyinfra-venv

2. Activate the Virtual Environment

C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>C:\venvs\pyinfra-venv\Scripts\activate

(pyinfra-venv) C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>

3. Transfer Downloaded Packages

Copy the pyinfra_packages folder from your Docker host to your Windows VM. You can use any file transfer method available in your environment.

4. Install Packages Offline

Once you have the packages on your VM and your virtual environment activated:

(pyinfra-venv) C:\> cd path\to\pyinfra_packages

(pyinfra-venv) C:\path\to\pyinfra_packages> pip install --find-links . --no-index pyinfra

Verify Installation

pyinfra --version

Running Environment Checks

After installing pyinfra, you can run environment checks to verify your setup:

pyinfra @local env_checks.py

This will check:

  • ArcGIS Pro installation in common locations
  • pyinfra-venv virtual environment existence
  • Virtual environment activation readiness

Why PyInfra?

  • Better Windows Compatibility: Unlike Ansible or Salt cannot be hosted on Window machine
  • Simpler Dependencies: Fewer system-level dependencies
  • ArcGIS Pro Friendly: Better integration with Python-based GIS workflows

Version Compatibility

ArcGIS Pro 3.1.2

Important: If you're using ArcGIS Pro 3.1.2, you must use pyinfra < 3.0 due to compatibility issues with the Python environment in that version.

pip install "pyinfra<3.0"

ArcGIS Pro 3.5

For ArcGIS Pro 3.5 and later versions, you can use the latest pyinfra version (3.x) as they have improved Python 3.11.11 support.

About

A POC to automate tasks and deployment in air gapped environment where need to rely on ArcGIS Pro built in Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published