getting a few python packages onto the jetson-nano (or most anything with a Debian-style linux, for example a raspberry pi) without an internet connection.
Assuming another Debian or Debian-derived linux box (ubuntu or raspbian) that does have an internet connection.
First, download the python-pip packages. for both python 2 and python 3:
apt-get download python-pip python3-pip
two files should be downloaded (check with ls):
python-pip_9.0.1-2.3~ubuntu1.18.04.1_all.deb python3-pip_9.0.1-2.3~ubuntu1.18.04.1_all.deb
These are native ubuntu '.deb' packages. Copy them to the usb stick.
Next, download the python packages we need, using pip:
pip download imutils pip download pynetworktables
pynetworktables depends on another package called monotonic, so there should be 3 more files:
imutils-0.5.3.tar.gz monotonic-1.5-py2.py3-none-any.whl pynetworktables-2018.2.1-py2.py3-none-any.whl
copy them to the usb stick too.
move the usb stick to the nano; copy all of those files above to a folder called for example download/cv-tools
First, we have to install pip:
sudo dpkg -i download/cv-tools/python-pip_9.0.1-2.3~ubuntu1.18.04.1_all.deb sudo dpkg -i download/cv-tools/python3-pip_9.0.1-2.3~ubuntu1.18.04.1_all.deb
Next, install those python packages, using the pip command htat we just installed, but running these commands:
cd download pip install imutils --no-index --find-links cv-tools/ pip install pynetworktables --no-index --find-links cv-tools/
The options “–no-index –find-links cv-tools/” tell pip not to use the internet for the package index and to download stuff, but to use only what's in the cv-tools directory.
After that, I can run our python opencv script without crashing due to missing packages.