Tip: No Internet connection?

Here’s what to do in case you need to run one of the tools on a computer not having Internet connectivity.

There are two ways to grab the needed pip installer packages, depending on whether there is a local Python 3 installation available. In both cases, you’ll use a different computer that has Internet access to dowload the packages.

Warning

You might have both Python 2 and Python 3 installed on your machine! Make sure you use the correct pip command:

Run pip --version to check that you have the Python 3 version in use. In case it shows Python 2, replace pip with pip3 in the following steps.

  1. Without Python 3 installed locally:

    • Visit the Python Package Index,

    • use the search function to locate the required packages and their pre-requisites (!), then

    • download them, one by one. Make sure you download the latest versions, please!

  2. With a Python >= 3.4.3 installation available:

    • Make sure you have setuptools and pip updated to the latest release:

      $ pip install --upgrade --no-cache-dir setuptools pip
      
    • Download the required packages:

      $ pip download --no-cache-dir <hcp_tool>
      

      Example:

      $ pip download --no-cache-dir hcpcbc
      Collecting hcpcbc
        Downloading hcpcbc-2.1.4.tar.gz
        Saved ./hcpcbc-2.1.4.tar.gz
      Collecting hcpsdk>=0.9.4.post0 (from hcpcbc)
        Downloading hcpsdk-0.9.4.post1.tar.gz
        Saved ./hcpsdk-0.9.4.post1.tar.gz
      Collecting XlsxWriter>=0.7.7 (from hcpcbc)
        Downloading XlsxWriter-0.8.4-py2.py3-none-any.whl (134kB)
          100% |████████████████████████████████| 135kB 2.1MB/s
        Saved ./XlsxWriter-0.8.4-py2.py3-none-any.whl
      Collecting dnspython3==1.12.0 (from hcpsdk>=0.9.4.post0->hcpcbc)
        Downloading dnspython3-1.12.0.zip (226kB)
          100% |████████████████████████████████| 229kB 1.8MB/s
        Saved ./dnspython3-1.12.0.zip
      Successfully downloaded hcpcbc hcpsdk XlsxWriter dnspython3
      

      As you see, the command downloaded all required packages (including pre-requisites):

      $ ls -lh
      total 832
      -rw-r--r--  1 sm  staff   132K Feb 12 17:43 XlsxWriter-0.8.4-py2.py3-none-any.whl
      -rw-r--r--  1 sm  staff   222K Feb 12 17:43 dnspython3-1.12.0.zip
      -rw-r--r--  1 sm  staff    21K Feb 12 17:43 hcpcbc-2.1.4.tar.gz
      -rw-r--r--  1 sm  staff    35K Feb 12 17:43 hcpsdk-0.9.4.post1.tar.gz
      
    • Copy the downloaded files over to the computer without Internet connectivity and install there:

      $ pip install dnspython3-1.12.0.zip \
                    hcpcbc-2.1.4.tar.gz \
                    hcpsdk-0.9.4.post1.tar.gz \
                    XlsxWriter-0.8.4-py2.py3-none-any.whl
      Processing ./dnspython3-1.12.0.zip
      Processing ./hcpcbc-2.1.4.tar.gz
      Processing ./hcpsdk-0.9.4.post1.tar.gz
      Processing ./XlsxWriter-0.8.4-py2.py3-none-any.whl
      Collecting hcpsdk>=0.9.4.post0 (from hcpcbc==2.1.4)
        Using cached hcpsdk-0.9.4.post1.tar.gz
      Installing collected packages: XlsxWriter, dnspython3, hcpsdk, hcpcbc
        Running setup.py install for dnspython3 ... done
        Running setup.py install for hcpsdk ... done
        Running setup.py install for hcpcbc ... done
      Successfully installed XlsxWriter-0.8.4 dnspython3-1.12.0 hcpcbc-2.1.4 hcpsdk-0.9.4.post1
      

      Warning

      You need to list all the downloaded packages as part of the pip install command.

      If you don’t do so, pip will try to fullfill pre-requisites not listed by calling the Python Package Index, which of course will make the whole process to fail if there’s no connection possible.