{
  "id": 381938,
  "title": "Pip dependencies requiring a restart?",
  "url": "/competitions/rsna-breast-cancer-detection/discussion/381938",
  "author_name": "Olly",
  "post_date": "2023-01-28T19:38:20.263000",
  "votes": 1,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Hi, sorry if this is super simple but I'm new to how Kaggle notebooks work. I've had a lot of issues installing GDCM and associated packages, I've finally got it to work after hours using:</p>\n<pre><code>!pip install pylibjpeg pylibjpeg-libjpeg pydicom\n!pip install python-gdcm\n</code></pre>\n<p>however the only way this works is with a kernel restart which doesn't work on notebook submission. Is there something I'm missing here? Can I submit a virtualenv or something? Thanks for any help</p>",
  "messages": [
    {
      "id": 2119470,
      "postDate": "2023-01-28T19:38:20.263Z",
      "content": "<p>Hi, sorry if this is super simple but I'm new to how Kaggle notebooks work. I've had a lot of issues installing GDCM and associated packages, I've finally got it to work after hours using:</p>\n<pre><code>!pip install pylibjpeg pylibjpeg-libjpeg pydicom\n!pip install python-gdcm\n</code></pre>\n<p>however the only way this works is with a kernel restart which doesn't work on notebook submission. Is there something I'm missing here? Can I submit a virtualenv or something? Thanks for any help</p>",
      "rawMarkdown": "Hi, sorry if this is super simple but I'm new to how Kaggle notebooks work. I've had a lot of issues installing GDCM and associated packages, I've finally got it to work after hours using:\n```\n!pip install pylibjpeg pylibjpeg-libjpeg pydicom\n!pip install python-gdcm\n```\n\nhowever the only way this works is with a kernel restart which doesn't work on notebook submission. Is there something I'm missing here? Can I submit a virtualenv or something? Thanks for any help",
      "votes": 1
    },
    {
      "id": 2120382,
      "postDate": "2023-01-29T15:02:25.883Z",
      "content": "<p>emmm … It is abnormal. I have not met this problem. you can try offline requiring packages to install. It is useful for me.</p>",
      "rawMarkdown": "emmm ... It is abnormal. I have not met this problem. you can try offline requiring packages to install. It is useful for me.",
      "replies": [
        {
          "id": 2120652,
          "postDate": "2023-01-29T18:27:01.900Z",
          "content": "<p>thanks, do you have a recommendation on how I best do this?</p>",
          "rawMarkdown": "thanks, do you have a recommendation on how I best do this?",
          "replies": [
            {
              "id": 2121049,
              "postDate": "2023-01-30T02:49:45.927Z",
              "content": "<p>The way I've done this in previous contests (and hope to do so in this one) is basically to download the necessary packages and their dependencies to my own machine using 'pip download pkg-names', then upload them as datasets to add to my notebook, then run the necessary 'pip install' command inside my notebook code, specifying the filepaths to the uploaded packages.</p>\n<p>There are probably some posted scripts with the details, but at the moment I don't remember where they are.</p>\n<p>Hope this helps..</p>",
              "rawMarkdown": "The way I've done this in previous contests (and hope to do so in this one) is basically to download the necessary packages and their dependencies to my own machine using 'pip download pkg-names', then upload them as datasets to add to my notebook, then run the necessary 'pip install' command inside my notebook code, specifying the filepaths to the uploaded packages.\n\nThere are probably some posted scripts with the details, but at the moment I don't remember where they are.\n\nHope this helps..",
              "votes": 1
            },
            {
              "id": 2124902,
              "postDate": "2023-02-01T09:37:35.250Z",
              "content": "<p>Thanks! I'll give this a try, weirdly I found I needed to run this after installing GDCM<br>\n<code>\nimport importlib\nimportlib.reload(__import__(\"gdcm\"))\n</code><br>\nat least for developing. But yeah for final submission your solution seems like it fits the bill, thanks!</p>",
              "rawMarkdown": "Thanks! I'll give this a try, weirdly I found I needed to run this after installing GDCM\n`\nimport importlib\nimportlib.reload(__import__(\"gdcm\"))\n`\nat least for developing. But yeah for final submission your solution seems like it fits the bill, thanks!"
            }
          ]
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2120382,
      "author_name": "yoyobar",
      "author_url": "",
      "post_date": "2023-01-29T15:02:25.883000",
      "content": "<p>emmm … It is abnormal. I have not met this problem. you can try offline requiring packages to install. It is useful for me.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2120652,
          "author_name": "Olly",
          "author_url": "",
          "post_date": "2023-01-29T18:27:01.900000",
          "content": "<p>thanks, do you have a recommendation on how I best do this?</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2121049,
              "author_name": "David J. Slate",
              "author_url": "",
              "post_date": "2023-01-30T02:49:45.927000",
              "content": "<p>The way I've done this in previous contests (and hope to do so in this one) is basically to download the necessary packages and their dependencies to my own machine using 'pip download pkg-names', then upload them as datasets to add to my notebook, then run the necessary 'pip install' command inside my notebook code, specifying the filepaths to the uploaded packages.</p>\n<p>There are probably some posted scripts with the details, but at the moment I don't remember where they are.</p>\n<p>Hope this helps..</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2124902,
              "author_name": "Olly",
              "author_url": "",
              "post_date": "2023-02-01T09:37:35.250000",
              "content": "<p>Thanks! I'll give this a try, weirdly I found I needed to run this after installing GDCM<br>\n<code>\nimport importlib\nimportlib.reload(__import__(\"gdcm\"))\n</code><br>\nat least for developing. But yeah for final submission your solution seems like it fits the bill, thanks!</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2119470": "Hi, sorry if this is super simple but I'm new to how Kaggle notebooks work. I've had a lot of issues installing GDCM and associated packages, I've finally got it to work after hours using:\n```\n!pip install pylibjpeg pylibjpeg-libjpeg pydicom\n!pip install python-gdcm\n```\n\nhowever the only way this works is with a kernel restart which doesn't work on notebook submission. Is there something I'm missing here? Can I submit a virtualenv or something? Thanks for any help",
    "2120382": "emmm ... It is abnormal. I have not met this problem. you can try offline requiring packages to install. It is useful for me."
  }
}