2
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
- Reset the Embedded Python Environment: Delete the existing embedded Python folder located in your .idl folder: ~\.idl\idl-python3XX
- Install Desired Packages via IDL Console: Launch IDL and use the following commands to install desired packages:
PyUtils.PipInstall, 'beautifulsoup4'
PyUtils.PipInstall, 'zstandard'
…
3. 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’)
…
4. Archive the Python Environment: Compress the updated folder into an archive file (e.g., ZIP or TAR): ~\.idl\idl-pythonXXX
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 the .idl directory:: ~\.idl
- 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 XXX