Skip to content

Install the SDK offline

This page describes how to install the Python SDK on a host that has no network access.

Prerequisite

To install the Python SDK and its dependencies on an air-gapped computer, you need another computer with Internet access to prepare and download the Comet Python SDK (comet_ml) and its dependencies.

Both computers must use the same major Python version (for example 3.7 or 3.8) as the final target environment. You can check the version you are using with: pip -V.

If pip is not associated with the correct version of Python, replace the pip command with /PATH/TO/python -m pip in the following instructions. Then make sure both computers are using an up-to-date version of pip and the wheel Python package.

First, on the Internet-connected computer:

  • Update the pip and the wheel packages using: pip install -U pip wheel
  • Check pip version using: pip -V
  • Check the wheel version using: pip show wheel

Then download the updated pip and wheel packages using: pip download pip wheel. This will download two files in the current directory, for example, ./wheel-0.34.2-py2.py3-none-any.whl and ./pip-20.2.1-py2.py3-none-any.whl. Copy those files to the offline computer and install them using: pip install -U /PATH/TO/pip-20.2.1-py2.py3-none-any.whl then pip install -U /PATH/TO/wheel-0.34.2-py2.py3-none-any.whl.

Finally, check that both the online and offline computers are using the same Python version and the same ABI tags so you will download the correct dependencies. You can check the current ABI tag by running this code snippet: python -c "from wheel.pep425tags import *; print('{0}{1}-{2}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag()))"

Download the Comet SDK and dependencies

Now, from the online computer:

  • Create a directory named wheelhouse: mkdir wheelhouse.
  • Move to that directory: cd wheelhouse.
  • Download the Comet SDK with the right Python version: pip download comet_ml or /PATH/TO/python -m pip download comet_ml. This will download several .whl and .tar.gz files into the current directory.
  • Upload or make the wheelhouse directory accessible from the offline computer.

Install the Comet SDK and dependencies

From the offline computer:

  • Activate the target Python environment where you are going to run the experiments.
  • Install the Python SDK using: pip install --no-index --find-links /PATH/TO/wheelhouse comet_ml. This will install the Comet Python SDK and its dependencies using only the local files and won't make an external HTTP call.
Jan. 17, 2022