Applies To: Diskover 2.5.x+
Platforms: RHEL / Rocky Linux 8 & 9, Ubuntu / Debian 22 & 24
Overview
This guide covers how to install Python pip packages on Diskover hosts that have no internet access. In air-gapped or restricted network environments, you cannot pull packages from PyPI — instead, the Diskover team provides pre-built tarballs containing all required Python wheel (.whl) files for each component.
Starting with Diskover 2.5.x, all Python dependencies are installed into a dedicated virtual environment (/opt/python-venv-diskover) rather than the system Python. This page explains how to set up that venv on an offline host and install Diskover's pip dependencies from the provided tarballs.
When to use this guide:
Deploying Diskover in an air-gapped or network-restricted environment
Installing or upgrading Python packages on a host that cannot reach PyPI
Performing a manual (non-Ansible) offline pip installation
Note: For general pip usage, venv setup on internet-connected hosts, and background on how Python fits into the Diskover stack, see the PIP page.
Understanding Offline pip Installation
When a Diskover host cannot reach the internet, pip cannot download packages from PyPI. Instead, the Diskover team provides pre-built tarballs containing all the Python wheel (.whl) files needed for each component. You stage these tarballs on the target host and install from them locally.
All wheel packages included in the tarballs are sourced from the official Python Package Index at https://pypi.org/.
The two pip tarballs provided are:
Tarball | Contents | Install On |
|---|---|---|
| Python wheel files for Diskover Admin | Web hosts |
| Python wheel files for Diskoverd | Worker hosts |
These tarballs are version- and platform-specific — they are built to match a particular Diskover version, OS (RHEL/Rocky 8 or 9), and Python version. To request the correct tarballs for your environment, contact Diskover Support.
The installation uses two key pip flags:
--no-index— tells pip not to query PyPI--find-links=<local-path>— points pip to the local directory containing the extracted wheel files
This works the same way whether you're installing into the Diskover venv or the system Python.
Diskover Python Virtual Environment (Offline Setup)
Python 3.11+ and the venv module must be available on the target host before proceeding. Install these from your system's OS repositories or whatever Python packages ship with your OS image.
Python version requirements
Diskover requires Python 3.11 or newer for the virtual environment:
If your system Python is 3.12 or newer, you can use the system version directly.
Otherwise, install Python 3.11 using your OS package manager.
Check your system version with:
python3 -V
Create the Diskover venv
RHEL / Rocky Linux:
If the system Python version is older than 3.12, install the target Python version and development headers:
dnf install python3.11 python3.11-devel gcc
If the system Python is already 3.12+:
dnf install gcc python3-devel
Create the virtual environment (replace 3.11 with your target version if different):
python3.11 -m venv /opt/python-venv-diskover
Ubuntu / Debian:
Install the venv module and development headers:
apt install python3-venv gcc python3.11-dev
Create the virtual environment:
python3.11 -m venv /opt/python-venv-diskover
Add the venv to your system PATH
Create a profile script so the venv is available to all users and services:
cat > /etc/profile.d/diskover-venv.sh << 'EOF' # Add Diskover venv to PATH for CLI usage export PATH="/opt/python-venv-diskover/bin:$PATH" EOF chmod 0644 /etc/profile.d/diskover-venv.sh
Source it in your current session (or log out and back in):
source /etc/profile.d/diskover-venv.sh
Verify the venv is active:
which python3 # Expected: /opt/python-venv-diskover/bin/python3 which pip # Expected: /opt/python-venv-diskover/bin/pip
Obtain the Pip Tarballs
The pip tarballs (admin-pips.tgz and worker-pips.tgz) are provided by the Diskover team as part of the offline installation artifact set. Contact Diskover Support to request them for your target OS and Diskover version.
Note: These tarballs are typically provided alongside the other offline artifacts (Elasticsearch, RabbitMQ, Python RPMs, etc.). If you already have the full set of offline tarballs, you should already have the pip tarballs included.
Stage Tarballs on the Target Host
Transfer the pip tarballs to the target machine using whatever method your network allows — SCP, shared mount, etc.
Via SCP:
scp admin-pips.tgz username@web-host:/tmp/ scp worker-pips.tgz username@worker-host:/tmp/
On the target host, extract the tarballs:
# On the web host tar -xvzf /tmp/admin-pips.tgz -C /tmp/offline-pips/ # On the worker host tar -xvzf /tmp/worker-pips.tgz -C /tmp/offline-pips/
After extraction, the wheel files will be available at:
/tmp/offline-pips/admin-pips/— Diskover Admin dependencies (web host)/tmp/offline-pips/worker-pips/— Diskoverd dependencies (worker host)
Install Packages on the Offline Host
Using the venv (recommended)
Diskover Admin (on the web host):
/opt/python-venv-diskover/bin/pip install --no-index --find-links=/tmp/offline-pips/admin-pips/ -r /var/www/diskover-admin/etc/requirements.txt
Diskoverd (on the worker host):
/opt/python-venv-diskover/bin/pip install --no-index --find-links=/tmp/offline-pips/worker-pips/ -r /opt/diskover/requirements.txt
Install all wheels in a directory (alternative):
If you want to install every package in a tarball without referencing a requirements file:
/opt/python-venv-diskover/bin/pip install --no-index --find-links=/tmp/offline-pips/admin-pips/ /tmp/offline-pips/admin-pips/*.whl
System Python (legacy)
These commands install into the system Python and are provided for reference only. Use the venv commands above for Diskover 2.5.x+ deployments.
Diskover Admin:
python3 -m pip install --no-index --find-links=/tmp/offline-pips/admin-pips/ -r /var/www/diskover-admin/etc/requirements.txt
Diskoverd (Task Worker):
python3 -m pip install --no-index --find-links=/tmp/offline-pips/worker-pips/ -r /opt/diskover/requirements.txt
Windows Offline Installation
On Windows worker hosts, the same tarball-based workflow applies. The Diskover team provides a worker-pips.tgz built for Windows. Contact Diskover Support to request the Windows-specific tarballs.
Stage and extract on the Windows host
Transfer the worker-pips.tgz to the Windows machine and extract it to a local directory (e.g., C:\pip-packages\).
Install packages
Install all wheels:
python -m pip install --no-index --find-links="C:\pip-packages" (Get-ChildItem -Path "C:\pip-packages\*.whl").FullName
Install from a specific requirements file:
python -m pip install --no-index --find-links="C:\pip-packages" -r "C:\Program Files\Diskover\requirements.txt"
Troubleshooting
"No matching distribution found"
The wheel files in the tarball don't match the target host's Python version or OS architecture. For example, wheels built for Python 3.12 on RHEL 9 won't install on a host running Python 3.11 on RHEL 8.
Fix:
Verify the Python version on the target host:
python3 -VVerify the OS version:
cat /etc/os-releaseContact Diskover Support to request tarballs that match your Python version and OS
"Could not find a version that satisfies the requirement"
A required wheel is missing from the extracted tarball directory, or the tarball wasn't fully extracted.
Fix:
Verify the tarball was extracted completely:
ls -la /tmp/offline-pips/admin-pips/(orworker-pips)Check that
.whlfiles are present in the directoryRe-extract the tarball:
tar -xvzf /tmp/admin-pips.tgz -C /tmp/offline-pips/If files are still missing, the tarball may be incomplete — contact Diskover Support for a fresh copy
Permission denied during pip install
The pip install command needs to be run as root (or with sudo) when installing into the Diskover venv at /opt/python-venv-diskover.
Fix:
Run the install command as root or with
sudo:sudo /opt/python-venv-diskover/bin/pip install --no-index --find-links=/tmp/offline-pips/admin-pips/ -r /var/www/diskover-admin/etc/requirements.txt
Verify the venv directory permissions:
ls -la /opt/python-venv-diskover/
Venv python3 not found after creation
After creating the venv, running which python3 still points to the system Python instead of the venv.
Fix:
Ensure the PATH profile script was created and sourced:
cat /etc/profile.d/diskover-venv.sh source /etc/profile.d/diskover-venv.sh
Verify the venv binary exists:
ls /opt/python-venv-diskover/bin/python3If the venv was created with the wrong Python version, remove it and recreate:
rm -rf /opt/python-venv-diskover python3.11 -m venv /opt/python-venv-diskover
Wrong tarball for OS version
The offline pip tarballs are built per OS version (RHEL/Rocky 8 or 9). Using tarballs built for the wrong OS version will result in install failures.
Fix:
Verify the target OS:
cat /etc/os-releaseEnsure the tarballs you received match your OS version
Contact Diskover Support to request the correct tarballs
Quick Reference
Item | Value |
|---|---|
Admin pip tarball |
|
Worker pip tarball |
|
Venv location |
|
PATH script |
|
Minimum Python | 3.11 |
Admin requirements |
|
Worker requirements |
|
Key pip flags |
|
Windows Python command |
|
Linux Python command |
|
Support |
Comments
0 comments
Please sign in to leave a comment.