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:
- Download all required PyInfra packages for Windows Python 3.9.16 using Docker
- Transfer the downloaded packages to your ArcGIS Pro VM
- Install them offline in a virtual environment
- Run automated environment checks with a user-friendly TUI (Text User Interface)
cd arcpy3-pyinfra
docker compose up --build
OR
podman compose up --build
The packages will be downloaded to the ./pyinfra_packages
directory.
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
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>
Copy the pyinfra_packages
folder from your Docker host to your Windows VM. You can use any file transfer method available in your environment.
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
pyinfra --version
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
- 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
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"
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.