Cant install ansible offline

I have a docker container that already has ansible 2.8. I am trying to update it to 2.18. the way it works now is that the container is installing packages from a pypi server.

example: bash -c pip install -i https://pypi.eie.io/simple --trusted-host pypi.eie ansible==2.18.2

The machine does not have access to the internet nor do I have access to pypi server right now.

I put the ansible tar file on the local machine and did:

python3 -m pip install --upgrade /tmp/ansible_core2.18.2.tar.gz

but I keep getting

wARNING: Disabling truststore since ssi support is missing

wARNING: Pip is configured with locations that require TLS/SSL, however the ssl module

EPRECATION: Loading egg at /us/local/Tib/python3.13/site-packages/setuptools-75. 8. 0-p change. A possible replacement is to use pip for package installation. Discussion can t

rocessing -/ansible core-2.18. 2.tar• gz

Installing buiid dependencies •• error

error: subprocess-exited-with-error

x pip subprocess to install build dependencies did not run successfully.

exit code: 1

→ [10 lines of output]

WARNING: Disabling truststore since ssl support is missing

WARNING: pip is configured with locations that require LS/SSL, however the ssl modi

read=None, redirect=None, Status-Non

WARNING: Retrying (Retry(total=3, connect=None,

read-None, redirect=None, status=Non

HTTPS URL because the SSL module is not available. ")*: /simple/setuptools/

WARNING: Retrying (Retry(total=2, connect=None,

read-None, redirect=None, status=None

HTTPS URL because the SSL module is not available. ")*: /simple/setuptools/

WARNING: Retrying Retry(total-l, connect-None,

read-None, redirect=None, status-None

HTTPS URL because the SSL module is not available.")': /simple/setuptools/

WARNING: Retrying (Retry(total=0,

connect=None,

read-None, redirect-None, status=None)

HTTPS URL because the SSL module is not available.")': /simple/setuptools/

Could not fetch URL https://pypi.org/simple/setuptools/: There was a problen confirmin g', port-443): Max retries exceeded with url: /simple/setuptools/ (Caused by SSLError (*Can't Table.)) - skipping

ERROR: Could not find a version that satisfies the requirement setuptools<=75.8.0,>=66.

ERROR: No matching distribution found for setuptools<=75.8.0,>=66.1.0

Lend of outputi

note: This error originates from a subprocess, and is likely not a problem with pip.

WARNING: Disabling truststore since ssl support is missing

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Pyth

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssi certi

: Max retries exceeded with url: /simple/pip/ (Caused by SSLError ("Can't connect to HTTPS URL I error: subprocess-exited-with-error

x pip subprocess to install build dependencies did not run successfully.

exit code: 1

- See above for output.

I dont have access to this pypi server a the moment. It looks like it keeps looking for it to install.

How do I make it look locally for the packages?

I dont have a file called /etc/pip.conf or /etc/xdg/pip/pip.conf

pip3 list |grep setup
setuptools 75.8.0

python version:
3.13.2

Hi James,

Ansible package is not self contained so it has many Python dependencies and it has to pull them from pypi. You either have to have network connectivity to pypi or hunt for all the dependencies.

Since this is a container, it’s maybe best to install/update Ansible on a machine with network connectivity and then transfer the container image to the airgapped machine.

2 Likes