You can get python packages by using a python virtual environment. Search for it on the internet, just a few commands and it doesn't bother any truenas packages.
So, cd to some dataset/directory where you want to put it and do something like (not checked but again google it and you can replace yourenv with some other name):
python -m venv yourenv --without-pip --system-site-packages
source yourenv/bin/activate (now you can in the virtual python environment)
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py rm get-pip.py
Now you have pip but only inside the python virtial environment. When you want to exit the environment, type deactivate, but meanwhile load your code up somewhere and load all your pip modules your heart desires from within the environment.
To run your code from outside the virtual environment, whatever it is, you might do something like:
cd to your code directory
/pathtoyourvirtualenvironment/bin/python yourpythonscript
To just enter your virtual environment for various reasons, use source pathtovenv/bin/activate