19
How to install custom packages into the embedded IDL-Python installation on a system with no internet connection
Overview
Starting with IDL version 9.2, the software includes an embedded Python environment that supports the installation of custom Python packages via the PipInstall method within the PyUtils class. This functionality streamlines integration with Python libraries directly from the IDL interface.
However, this package installation mechanism requires an active internet connection. Systems operating in secure or offline environments will be unable to utilize PipInstall directly, as it depends on online access to Python package repositories.
Offline Installation Work-around
To accommodate offline workflows, users may replicate the package installation process on a separate, internet-connected machine and then transfer the configured Python environment to the offline system. This approach mirrors standard practices for managing Python dependencies in air-gapped environments.
NOTICE: This workaround is provided as a courtesy and has not undergone formal validation or support testing. Results may vary depending on system configuration and package dependencies.
Prerequisites
To ensure compatibility and minimize errors, both the source (online) and target (offline) machines must meet the following criteria:
- Identical IDL version installed on both systems
- Matching operating systems (Windows, Linux, or macOS)
- Valid IDL licenses on both machines (license transfers may be necessary during the process)
Step 1: Prepare the Environment on the Internet-Connected Computer
- Is Your Python Environment Already Configured? Custom packages for the embedded Python installation are stored in the following location:
Windows: C:\Users\YourUsername\.idl\idl-python3XX
Linux: ~/.idl/idl-python3XX
NOTE: If you have never used Python from IDL before on this computer, this folder may not exist.
If your IDL-Python environment is already fully configured how you want it on the online computer (all custom packages installed), proceed to Step 5.
- Optionally Delete or Backup the Embedded Python Environment: If you wish to start from a fresh Python installation, you can delete (to purge) or rename (to backup) the existing embedded Python folder.
- Install Desired Packages via IDL Console: Launch IDL and use the following commands to install desired packages:
PyUtils.PipInstall, 'beautifulsoup4'
PyUtils.PipInstall, 'zstandard'
…
4. Verify Installation and Import Functionality: Confirm installation succeeds in the IDL console for each and quickly test importing the new modules to be sure they work:
mod1 = Python.Import(‘bs4’)
mod2 = Python.Import(‘zstandard’)
…
5. Bundle Up the Python Environment: Compress the updated IDL-Python folder into an archive file (e.g., ZIP or TAR).
Step 2: Deploy the Environment to the Offline Computer
- Transfer the Archive: Move the compressed archive to the offline system using a secure method (e.g., USB drive).
- Extract the Environment: Decompress the archive file into your .idl directory.
- Validate Package Availability: Launch IDL and confirm that the packages are accessible via the IDL-Python bridge:
mod1 = Python.Import(‘bs4’)
mod2 = Python.Import(‘zstandard’)
…
Created by BC-US (11-6-2025) Reviewed by JU (11-11/25)