{
  "id": 382898,
  "title": "Pip installs with internet OFF ?",
  "url": "/competitions/icecube-neutrinos-in-deep-ice/discussion/382898",
  "author_name": "",
  "post_date": "2023-02-01T12:43:07.719216300Z",
  "votes": 6,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I was wondering, if internet is disabled when submitting, does that mean we can't use any \"pip install\" in the notebook too ? I am interested in using some pretty standard librairies, extending pytorch but there are not installed in the default environment. Thanks for your help !</p>",
  "messages": [
    {
      "id": "2125117",
      "postDate": "02/01/2023 12:43:07",
      "content": "<p>I was wondering, if internet is disabled when submitting, does that mean we can't use any \"pip install\" in the notebook too ? I am interested in using some pretty standard librairies, extending pytorch but there are not installed in the default environment. Thanks for your help !</p>",
      "rawMarkdown": "I was wondering, if internet is disabled when submitting, does that mean we can't use any \"pip install\" in the notebook too ? I am interested in using some pretty standard librairies, extending pytorch but there are not installed in the default environment. Thanks for your help !",
      "votes": null
    },
    {
      "id": "2125137",
      "postDate": "02/01/2023 13:05:36",
      "content": "<p>You can't <code>pip install</code> from the internet with the internet off.  However, you can package up the libraries you want, save them as Kaggle \"datasets\", attach the datasets to you notebook and then <code>pip install</code> specifying a path to the attached Kaggle dataset.</p>\n<p>See, for example, <a href=\"https://www.kaggle.com/code/roberthatch/lb-1-183-lightning-fast-baseline-with-polars/notebook\" target=\"_blank\">this notebook</a> which uses the approach to install the Polars library.</p>",
      "rawMarkdown": "You can't `pip install` from the internet with the internet off.  However, you can package up the libraries you want, save them as Kaggle \"datasets\", attach the datasets to you notebook and then `pip install` specifying a path to the attached Kaggle dataset.\n\nSee, for example, [this notebook](https://www.kaggle.com/code/roberthatch/lb-1-183-lightning-fast-baseline-with-polars/notebook) which uses the approach to install the Polars library.",
      "votes": null
    },
    {
      "id": "2125164",
      "postDate": "02/01/2023 13:43:12",
      "content": "<p><a href=\"https://www.kaggle.com/andrewrrose\" target=\"_blank\">@andrewrrose</a> Thank you for sharing, one question from learner, but how to package up libraries to  dataset?</p>",
      "rawMarkdown": "andrewrrose Thank you for sharing, one question from learner, but how to package up libraries to  dataset?",
      "votes": null
    },
    {
      "id": "2125428",
      "postDate": "02/01/2023 16:47:36",
      "content": "<p>Adding the dataset or a notebook output to our submission notebook inputs should do the trick ? <a href=\"https://www.kaggle.com/andrewrrose\" target=\"_blank\">@andrewrrose</a> </p>",
      "rawMarkdown": "Adding the dataset or a notebook output to our submission notebook inputs should do the trick ? @andrewrrose",
      "votes": null
    },
    {
      "id": "2125755",
      "postDate": "02/01/2023 21:06:55",
      "content": "<p><a href=\"https://www.kaggle.com/akmalmir\" target=\"_blank\">@akmalmir</a> Yes, I had to search up and learn this for the above notebook, I didn't know how until last week. You need to take the wheel binary (.whl) file(s) and add to a dataset. Then add dataset to your notebook.</p>\n<p>One more trick, if you click on that Polars dataset you'll see I did NOT create it myself. Since you are using \"some pretty standard libraries\" try searching the public datasets tab, see if other kagglers have already shared it. Might save a couple minutes. That's how I found the Polars dataset. :)</p>",
      "rawMarkdown": "akmalmir Yes, I had to search up and learn this for the above notebook, I didn't know how until last week. You need to take the wheel binary (.whl) file(s) and add to a dataset. Then add dataset to your notebook.\n\nOne more trick, if you click on that Polars dataset you'll see I did NOT create it myself. Since you are using \"some pretty standard libraries\" try searching the public datasets tab, see if other kagglers have already shared it. Might save a couple minutes. That's how I found the Polars dataset. :)",
      "votes": null
    },
    {
      "id": "2125780",
      "postDate": "02/01/2023 21:42:50",
      "content": "<p>Excellent advise ! I finally found a dataset matching my needs, thanks to your tips ! ty 💥</p>",
      "rawMarkdown": "Excellent advise ! I finally found a dataset matching my needs, thanks to your tips ! ty 💥",
      "votes": null
    },
    {
      "id": "2125858",
      "postDate": "02/02/2023 00:06:18",
      "content": "<p>There is an even simpler way, and I learned it from <a href=\"https://www.kaggle.com/jirkaborovec\" target=\"_blank\">@jirkaborovec</a> excellent notebooks: install the package in one notebook to an output directory, then load this notebook to another and load from the saved wheel. I mean, in both ways, you save and load the wheel file, but in Jirka's way, you don't need to search for the wheel, download, upload, etc., manually. Just !pip install in one notebook and load in another. See <a href=\"https://www.kaggle.com/code/jirkaborovec/icecube-neutrino-eda-3d-interactive-viewer/data\" target=\"_blank\">here where he saves the packages to an output directory</a> and <a href=\"https://www.kaggle.com/code/jirkaborovec/icecube-neutrino-fitting-3d-points-cloud/data\" target=\"_blank\">here where he loads them</a> .</p>",
      "rawMarkdown": "There is an even simpler way, and I learned it from @jirkaborovec excellent notebooks: install the package in one notebook to an output directory, then load this notebook to another and load from the saved wheel. I mean, in both ways, you save and load the wheel file, but in Jirka's way, you don't need to search for the wheel, download, upload, etc., manually. Just !pip install in one notebook and load in another. See [here where he saves the packages to an output directory](https://www.kaggle.com/code/jirkaborovec/icecube-neutrino-eda-3d-interactive-viewer/data) and [here where he loads them](https://www.kaggle.com/code/jirkaborovec/icecube-neutrino-fitting-3d-points-cloud/data) .",
      "votes": null
    },
    {
      "id": "2126141",
      "postDate": "02/02/2023 05:41:59",
      "content": "<p>Since you can't pip install any packages when internet is disabled, you'll need to make sure you have uploaded any necessary packages prior to submitting. <br>\nTo do this, upload the package files as a dataset and then use pip to install this package from the dataset.</p>\n<p>The Devastator.</p>",
      "rawMarkdown": "Since you can't pip install any packages when internet is disabled, you'll need to make sure you have uploaded any necessary packages prior to submitting. \nTo do this, upload the package files as a dataset and then use pip to install this package from the dataset.\n\nThe Devastator.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2125137,
      "author_name": "andrewrrose",
      "author_url": "",
      "post_date": "02/01/2023 13:05:36",
      "content": "<p>You can't <code>pip install</code> from the internet with the internet off.  However, you can package up the libraries you want, save them as Kaggle \"datasets\", attach the datasets to you notebook and then <code>pip install</code> specifying a path to the attached Kaggle dataset.</p>\n<p>See, for example, <a href=\"https://www.kaggle.com/code/roberthatch/lb-1-183-lightning-fast-baseline-with-polars/notebook\" target=\"_blank\">this notebook</a> which uses the approach to install the Polars library.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2125164,
          "author_name": "akmalmir",
          "author_url": "",
          "post_date": "02/01/2023 13:43:12",
          "content": "<p><a href=\"https://www.kaggle.com/andrewrrose\" target=\"_blank\">@andrewrrose</a> Thank you for sharing, one question from learner, but how to package up libraries to  dataset?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2125428,
          "author_name": "louisstefanuto",
          "author_url": "",
          "post_date": "02/01/2023 16:47:36",
          "content": "<p>Adding the dataset or a notebook output to our submission notebook inputs should do the trick ? <a href=\"https://www.kaggle.com/andrewrrose\" target=\"_blank\">@andrewrrose</a> </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2125755,
          "author_name": "roberthatch",
          "author_url": "",
          "post_date": "02/01/2023 21:06:55",
          "content": "<p><a href=\"https://www.kaggle.com/akmalmir\" target=\"_blank\">@akmalmir</a> Yes, I had to search up and learn this for the above notebook, I didn't know how until last week. You need to take the wheel binary (.whl) file(s) and add to a dataset. Then add dataset to your notebook.</p>\n<p>One more trick, if you click on that Polars dataset you'll see I did NOT create it myself. Since you are using \"some pretty standard libraries\" try searching the public datasets tab, see if other kagglers have already shared it. Might save a couple minutes. That's how I found the Polars dataset. :)</p>",
          "votes": null,
          "replies": [
            {
              "id": 2125780,
              "author_name": "louisstefanuto",
              "author_url": "",
              "post_date": "02/01/2023 21:42:50",
              "content": "<p>Excellent advise ! I finally found a dataset matching my needs, thanks to your tips ! ty 💥</p>",
              "votes": null,
              "replies": []
            },
            {
              "id": 2125858,
              "author_name": "shlomoron",
              "author_url": "",
              "post_date": "02/02/2023 00:06:18",
              "content": "<p>There is an even simpler way, and I learned it from <a href=\"https://www.kaggle.com/jirkaborovec\" target=\"_blank\">@jirkaborovec</a> excellent notebooks: install the package in one notebook to an output directory, then load this notebook to another and load from the saved wheel. I mean, in both ways, you save and load the wheel file, but in Jirka's way, you don't need to search for the wheel, download, upload, etc., manually. Just !pip install in one notebook and load in another. See <a href=\"https://www.kaggle.com/code/jirkaborovec/icecube-neutrino-eda-3d-interactive-viewer/data\" target=\"_blank\">here where he saves the packages to an output directory</a> and <a href=\"https://www.kaggle.com/code/jirkaborovec/icecube-neutrino-fitting-3d-points-cloud/data\" target=\"_blank\">here where he loads them</a> .</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2126141,
      "author_name": "thedevastator",
      "author_url": "",
      "post_date": "02/02/2023 05:41:59",
      "content": "<p>Since you can't pip install any packages when internet is disabled, you'll need to make sure you have uploaded any necessary packages prior to submitting. <br>\nTo do this, upload the package files as a dataset and then use pip to install this package from the dataset.</p>\n<p>The Devastator.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2125117": "I was wondering, if internet is disabled when submitting, does that mean we can't use any \"pip install\" in the notebook too ? I am interested in using some pretty standard librairies, extending pytorch but there are not installed in the default environment. Thanks for your help !",
    "2125137": "You can't `pip install` from the internet with the internet off.  However, you can package up the libraries you want, save them as Kaggle \"datasets\", attach the datasets to you notebook and then `pip install` specifying a path to the attached Kaggle dataset.\n\nSee, for example, [this notebook](https://www.kaggle.com/code/roberthatch/lb-1-183-lightning-fast-baseline-with-polars/notebook) which uses the approach to install the Polars library.",
    "2125164": "andrewrrose Thank you for sharing, one question from learner, but how to package up libraries to  dataset?",
    "2125428": "Adding the dataset or a notebook output to our submission notebook inputs should do the trick ? @andrewrrose",
    "2125755": "akmalmir Yes, I had to search up and learn this for the above notebook, I didn't know how until last week. You need to take the wheel binary (.whl) file(s) and add to a dataset. Then add dataset to your notebook.\n\nOne more trick, if you click on that Polars dataset you'll see I did NOT create it myself. Since you are using \"some pretty standard libraries\" try searching the public datasets tab, see if other kagglers have already shared it. Might save a couple minutes. That's how I found the Polars dataset. :)",
    "2125780": "Excellent advise ! I finally found a dataset matching my needs, thanks to your tips ! ty 💥",
    "2125858": "There is an even simpler way, and I learned it from @jirkaborovec excellent notebooks: install the package in one notebook to an output directory, then load this notebook to another and load from the saved wheel. I mean, in both ways, you save and load the wheel file, but in Jirka's way, you don't need to search for the wheel, download, upload, etc., manually. Just !pip install in one notebook and load in another. See [here where he saves the packages to an output directory](https://www.kaggle.com/code/jirkaborovec/icecube-neutrino-eda-3d-interactive-viewer/data) and [here where he loads them](https://www.kaggle.com/code/jirkaborovec/icecube-neutrino-fitting-3d-points-cloud/data) .",
    "2126141": "Since you can't pip install any packages when internet is disabled, you'll need to make sure you have uploaded any necessary packages prior to submitting. \nTo do this, upload the package files as a dataset and then use pip to install this package from the dataset.\n\nThe Devastator."
  },
  "source": "meta"
}