Skip to content

Installing Python and Neuropoly libraries offline in a Kaggle notebook #33

@simonqueric

Description

@simonqueric

In Kaggle competitions, it's common to submit notebooks where internet access is disabled to prevent data leakage. Here's a guide on how to install a Python library offline. Contributions to this issue are welcome.

Installation of a python library offline

To install a Python library in a Kaggle notebook where internet access is disabled, you'll need to use a local .whl (wheel) file for the library. Here's an example of how to install a Python library offline using a wheel file:

  1. Get the wheel (with internet, on your computer) with the command pip wheel --no-deps monai
  2. Then, upload the wheel file as a dataset to /kaggle/input/.
  3. Use the following command to install the library : !pip install --no-deps /kaggle/input/kaggle-wheels/monai-1.3.2-py3-none-any.whl

--no-deps : This flag tells pip not to try to resolve or install dependencies, which is important since internet access is restricted.

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions