How to use Python additional packages without an internet connection?

python task additionalPackages unable to install as app server doesnt have internet connection Screen Shot on 2022-05-13 at 14-10-32.png - Droplr

we have installed them manually. On app server we have python3 installed and pip freeze shows the requests module.

su to morpheus-local  and pip freeze shows requests 

Are you putting requests in the the additional packages dialog when it’s already installed?

tried without requests in the additional packages and it fails with ModuleNotFound error

You cant since we use virtualenv

The packages are isolated

Ah, yeah, because a new virtualenv is created when the task is run.

There is a way

I defer to the python prime minister nick on this one

Anish Abraham what's the python version? 2 or 3?

3

If you’ve still got the files you used to install requests and it’s dependencies, you can specify the filenames as the additional packages and pip will install them from the files

we installed requests via yum

python3-requests

is there a way to import from sys?

that’s an option to virtualenv. one sec

Yeah, it’s a switch to virtualenv, which we can’t modify. One sec

Begin the python script with this:
import sys
sys.path.append('/usr/lib/python3/dist-packages')

replace with the path where the packages are kept

cool, trying that