{
  "id": 369272,
  "title": "How to fix reading image?",
  "url": "/competitions/rsna-breast-cancer-detection/discussion/369272",
  "author_name": "MIkhail Donskoy",
  "post_date": "2022-11-29T14:41:46.844000",
  "votes": 5,
  "comment_count": 7,
  "views": 0,
  "content": "<p>When I try to upload an image, I get the following error:</p>\n<blockquote>\n  <p>The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. ), pylibjpeg (req. )</p>\n</blockquote>\n<p>Code:<br>\npydicom.dcmread(f).pixel_array</p>\n<p>!pip install -qU python-gdcm pydicom pylibjpeg does not help</p>",
  "messages": [
    {
      "id": 2048563,
      "postDate": "2022-11-29T14:41:46.843Z",
      "content": "<p>When I try to upload an image, I get the following error:</p>\n<blockquote>\n  <p>The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. ), pylibjpeg (req. )</p>\n</blockquote>\n<p>Code:<br>\npydicom.dcmread(f).pixel_array</p>\n<p>!pip install -qU python-gdcm pydicom pylibjpeg does not help</p>",
      "rawMarkdown": "When I try to upload an image, I get the following error:\n> The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. ), pylibjpeg (req. )\n\nCode:\npydicom.dcmread(f).pixel_array\n\n\n!pip install -qU python-gdcm pydicom pylibjpeg does not help",
      "votes": 5
    },
    {
      "id": 2048676,
      "postDate": "2022-11-29T15:49:13.187Z",
      "content": "<p>This worked for me:</p>\n<pre><code>pip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom\n</code></pre>\n<p>You need to restart the kernel after installation though or else you might not be able to read all the images in the train set without error.</p>",
      "rawMarkdown": "This worked for me:\n\n```\npip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom\n```\n\nYou need to restart the kernel after installation though or else you might not be able to read all the images in the train set without error.",
      "votes": 3,
      "replies": [
        {
          "id": 2048726,
          "postDate": "2022-11-29T16:29:07.203Z",
          "content": "<p>Thank you!!</p>",
          "rawMarkdown": "Thank you!!",
          "votes": 1
        }
      ]
    },
    {
      "id": 2048966,
      "postDate": "2022-11-29T20:20:19.273Z",
      "content": "<p>Had the same question <a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/369259\" target=\"_blank\">here</a>. As <a href=\"https://www.kaggle.com/imvision12\" target=\"_blank\">@imvision12</a> suggested, this worked for me:</p>\n<pre><code>!pip install python-gdcm -q\n!pip install pylibjpeg -q\n</code></pre>",
      "rawMarkdown": "Had the same question [here](https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/369259). As @imvision12 suggested, this worked for me:\n```\n!pip install python-gdcm -q\n!pip install pylibjpeg -q\n```",
      "votes": 1
    },
    {
      "id": 2048790,
      "postDate": "2022-11-29T17:19:45.827Z",
      "content": "<p>Hey! I had the same problem and did the solution that <a href=\"https://www.kaggle.com/radek1\" target=\"_blank\">@radek1</a> suggested, however internet access is disabled for this competition, so how will that work? I'm still kind of new to Kaggle competitions so sorry if this is a stupid question.</p>",
      "rawMarkdown": "Hey! I had the same problem and did the solution that @radek1 suggested, however internet access is disabled for this competition, so how will that work? I'm still kind of new to Kaggle competitions so sorry if this is a stupid question.",
      "votes": 1,
      "replies": [
        {
          "id": 2048804,
          "postDate": "2022-11-29T17:26:22.207Z",
          "content": "<p>you have to install these libraries … Here is an example of installing them without the internet (for doing proper submission) (top cells of notebook)<br>\n<a href=\"https://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier\" target=\"_blank\">https://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier</a></p>",
          "rawMarkdown": "you have to install these libraries … Here is an example of installing them without the internet (for doing proper submission) (top cells of notebook)\nhttps://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier\n",
          "votes": 4
        },
        {
          "id": 2049001,
          "postDate": "2022-11-29T20:54:19.367Z",
          "content": "<p>Hi! pip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom and after that rastart kernal</p>",
          "rawMarkdown": "Hi! pip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom and after that rastart kernal",
          "votes": 1
        },
        {
          "id": 2049304,
          "postDate": "2022-11-30T03:29:02.323Z",
          "content": "<p>Oh alright tysm!</p>",
          "rawMarkdown": "Oh alright tysm!"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2048676,
      "author_name": "Radek Osmulski",
      "author_url": "",
      "post_date": "2022-11-29T15:49:13.187000",
      "content": "<p>This worked for me:</p>\n<pre><code>pip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom\n</code></pre>\n<p>You need to restart the kernel after installation though or else you might not be able to read all the images in the train set without error.</p>",
      "votes": 3,
      "replies": [
        {
          "id": 2048726,
          "author_name": "MIkhail Donskoy",
          "author_url": "",
          "post_date": "2022-11-29T16:29:07.203000",
          "content": "<p>Thank you!!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2048966,
      "author_name": "moth",
      "author_url": "",
      "post_date": "2022-11-29T20:20:19.273000",
      "content": "<p>Had the same question <a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/369259\" target=\"_blank\">here</a>. As <a href=\"https://www.kaggle.com/imvision12\" target=\"_blank\">@imvision12</a> suggested, this worked for me:</p>\n<pre><code>!pip install python-gdcm -q\n!pip install pylibjpeg -q\n</code></pre>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2048790,
      "author_name": "ayaan",
      "author_url": "",
      "post_date": "2022-11-29T17:19:45.827000",
      "content": "<p>Hey! I had the same problem and did the solution that <a href=\"https://www.kaggle.com/radek1\" target=\"_blank\">@radek1</a> suggested, however internet access is disabled for this competition, so how will that work? I'm still kind of new to Kaggle competitions so sorry if this is a stupid question.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2048804,
          "author_name": "DrHB",
          "author_url": "",
          "post_date": "2022-11-29T17:26:22.207000",
          "content": "<p>you have to install these libraries … Here is an example of installing them without the internet (for doing proper submission) (top cells of notebook)<br>\n<a href=\"https://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier\" target=\"_blank\">https://www.kaggle.com/code/selimsef/rsna-csn-segmentor-classifier</a></p>",
          "votes": 4,
          "replies": []
        },
        {
          "id": 2049001,
          "author_name": "MIkhail Donskoy",
          "author_url": "",
          "post_date": "2022-11-29T20:54:19.367000",
          "content": "<p>Hi! pip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom and after that rastart kernal</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 2049304,
          "author_name": "ayaan",
          "author_url": "",
          "post_date": "2022-11-30T03:29:02.323000",
          "content": "<p>Oh alright tysm!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2048563": "When I try to upload an image, I get the following error:\n> The following handlers are available to decode the pixel data however they are missing required dependencies: GDCM (req. ), pylibjpeg (req. )\n\nCode:\npydicom.dcmread(f).pixel_array\n\n\n!pip install -qU python-gdcm pydicom pylibjpeg does not help",
    "2048676": "This worked for me:\n\n```\npip install -U pylibjpeg pylibjpeg-openjpeg pylibjpeg-libjpeg pydicom\n```\n\nYou need to restart the kernel after installation though or else you might not be able to read all the images in the train set without error.",
    "2048966": "Had the same question [here](https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/369259). As @imvision12 suggested, this worked for me:\n```\n!pip install python-gdcm -q\n!pip install pylibjpeg -q\n```",
    "2048790": "Hey! I had the same problem and did the solution that @radek1 suggested, however internet access is disabled for this competition, so how will that work? I'm still kind of new to Kaggle competitions so sorry if this is a stupid question."
  }
}