{
  "id": 293642,
  "title": "Pip error: could not create 'build': Read-only file system",
  "url": "/competitions/tensorflow-great-barrier-reef/discussion/293642",
  "author_name": "datasaurus",
  "post_date": "2021-12-06T11:22:23.885000",
  "votes": 8,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I'm trying to install <code>timm</code> and other packages using an offline <a href=\"https://www.kaggle.com/kozodoi/timm-pytorch-image-models\" target=\"_blank\">dataset</a>. My standard way of doing this like this:</p>\n<pre><code>import subprocess\n\nwhls = [\n    \"../input/timm-pytorch-image-models/pytorch-image-models-master\",\n    # paths to other packages\n]\n\nfor w in whls:\n    print(\"Installing\", w)\n    subprocess.call([\"pip\", \"install\", w, \"--no-deps\", \"--upgrade\"])\n</code></pre>\n<p>I'm seeing this error:</p>\n<pre><code>  ERROR: Command errored out with exit status 1:\n   command: /opt/conda/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/setup.py'\"'\"'; __file__='\"'\"'/kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/setup.py'\"'\"';f = getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__) if os.path.exists(__file__) else io.StringIO('\"'\"'from setuptools import setup; setup()'\"'\"');code = f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' bdist_wheel -d /tmp/pip-wheel-3kszrhie\n       cwd: /kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/\n  Complete output (5 lines):\n  running bdist_wheel\n  running build\n  running build_py\n  creating build\n  error: could not create 'build': Read-only file system\n  ----------------------------------------\n  ERROR: Failed building wheel for timm\n</code></pre>\n<p>The same code snippet works in my notebook for the Petfinder comp (2021-11-02 image)</p>\n<p>Anyone else seeing this with the 2021-12-01 notebook image? </p>",
  "messages": [
    {
      "id": 1608390,
      "postDate": "2021-12-06T11:22:23.887Z",
      "content": "<p>I'm trying to install <code>timm</code> and other packages using an offline <a href=\"https://www.kaggle.com/kozodoi/timm-pytorch-image-models\" target=\"_blank\">dataset</a>. My standard way of doing this like this:</p>\n<pre><code>import subprocess\n\nwhls = [\n    \"../input/timm-pytorch-image-models/pytorch-image-models-master\",\n    # paths to other packages\n]\n\nfor w in whls:\n    print(\"Installing\", w)\n    subprocess.call([\"pip\", \"install\", w, \"--no-deps\", \"--upgrade\"])\n</code></pre>\n<p>I'm seeing this error:</p>\n<pre><code>  ERROR: Command errored out with exit status 1:\n   command: /opt/conda/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/setup.py'\"'\"'; __file__='\"'\"'/kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/setup.py'\"'\"';f = getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__) if os.path.exists(__file__) else io.StringIO('\"'\"'from setuptools import setup; setup()'\"'\"');code = f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' bdist_wheel -d /tmp/pip-wheel-3kszrhie\n       cwd: /kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/\n  Complete output (5 lines):\n  running bdist_wheel\n  running build\n  running build_py\n  creating build\n  error: could not create 'build': Read-only file system\n  ----------------------------------------\n  ERROR: Failed building wheel for timm\n</code></pre>\n<p>The same code snippet works in my notebook for the Petfinder comp (2021-11-02 image)</p>\n<p>Anyone else seeing this with the 2021-12-01 notebook image? </p>",
      "rawMarkdown": "I'm trying to install `timm` and other packages using an offline [dataset](https://www.kaggle.com/kozodoi/timm-pytorch-image-models). My standard way of doing this like this:\n\n```\nimport subprocess\n\nwhls = [\n    \"../input/timm-pytorch-image-models/pytorch-image-models-master\",\n    # paths to other packages\n]\n\nfor w in whls:\n    print(\"Installing\", w)\n    subprocess.call([\"pip\", \"install\", w, \"--no-deps\", \"--upgrade\"])\n```\n\nI'm seeing this error:\n```\n  ERROR: Command errored out with exit status 1:\n   command: /opt/conda/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/setup.py'\"'\"'; __file__='\"'\"'/kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/setup.py'\"'\"';f = getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__) if os.path.exists(__file__) else io.StringIO('\"'\"'from setuptools import setup; setup()'\"'\"');code = f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' bdist_wheel -d /tmp/pip-wheel-3kszrhie\n       cwd: /kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/\n  Complete output (5 lines):\n  running bdist_wheel\n  running build\n  running build_py\n  creating build\n  error: could not create 'build': Read-only file system\n  ----------------------------------------\n  ERROR: Failed building wheel for timm\n```\n\nThe same code snippet works in my notebook for the Petfinder comp (2021-11-02 image)\n\nAnyone else seeing this with the 2021-12-01 notebook image? ",
      "votes": 8
    },
    {
      "id": 1611246,
      "postDate": "2021-12-07T19:44:15.847Z",
      "content": "<p>just copy the wheel into local directory, you cannot do any write operation on a dataset folder</p>",
      "rawMarkdown": "just copy the wheel into local directory, you cannot do any write operation on a dataset folder",
      "votes": 2,
      "replies": [
        {
          "id": 1611252,
          "postDate": "2021-12-07T20:04:01.533Z",
          "content": "<p>+1 to this, the dataset directory is mounted read-only, copying things to /kaggle/working (or any writable directory) should allow the install.</p>",
          "rawMarkdown": "+1 to this, the dataset directory is mounted read-only, copying things to /kaggle/working (or any writable directory) should allow the install.",
          "votes": 1
        },
        {
          "id": 1611323,
          "postDate": "2021-12-07T21:33:33.123Z",
          "content": "<p>Thanks gents. Using <code>sys.path.append</code> does the trick when using copies of repos.</p>\n<p>I guess I knew that datasets were always read-only but never gave any real thought about the .whl file that pip builds and where it ends up. </p>\n<p>Any idea why it worked before and why it doesn't now? (newer version of pip maybe?)</p>",
          "rawMarkdown": "Thanks gents. Using `sys.path.append` does the trick when using copies of repos.\n\nI guess I knew that datasets were always read-only but never gave any real thought about the .whl file that pip builds and where it ends up. \n\nAny idea why it worked before and why it doesn't now? (newer version of pip maybe?)",
          "votes": 1
        },
        {
          "id": 1611332,
          "postDate": "2021-12-07T21:46:25.520Z",
          "content": "<p>Yeah my best guess is something changed with the build step wanting to write to the local directory.</p>",
          "rawMarkdown": "Yeah my best guess is something changed with the build step wanting to write to the local directory.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1620244,
      "postDate": "2021-12-16T15:10:47.077Z",
      "content": "<p>just fix it based on the error message.  simply It is about path and permission.</p>",
      "rawMarkdown": "just fix it based on the error message.  simply It is about path and permission."
    },
    {
      "id": 1611231,
      "postDate": "2021-12-07T19:20:21.790Z",
      "content": "<p><a href=\"https://www.kaggle.com/addisonhoward\" target=\"_blank\">@addisonhoward</a> Do you know if something is different on the current Docker image?</p>",
      "rawMarkdown": "@addisonhoward Do you know if something is different on the current Docker image?"
    },
    {
      "id": 1608555,
      "postDate": "2021-12-06T12:43:19.580Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1611246,
      "author_name": "Psi",
      "author_url": "",
      "post_date": "2021-12-07T19:44:15.847000",
      "content": "<p>just copy the wheel into local directory, you cannot do any write operation on a dataset folder</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1611252,
          "author_name": "Dustin",
          "author_url": "",
          "post_date": "2021-12-07T20:04:01.533000",
          "content": "<p>+1 to this, the dataset directory is mounted read-only, copying things to /kaggle/working (or any writable directory) should allow the install.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1611323,
          "author_name": "datasaurus",
          "author_url": "",
          "post_date": "2021-12-07T21:33:33.123000",
          "content": "<p>Thanks gents. Using <code>sys.path.append</code> does the trick when using copies of repos.</p>\n<p>I guess I knew that datasets were always read-only but never gave any real thought about the .whl file that pip builds and where it ends up. </p>\n<p>Any idea why it worked before and why it doesn't now? (newer version of pip maybe?)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1611332,
          "author_name": "Dustin",
          "author_url": "",
          "post_date": "2021-12-07T21:46:25.520000",
          "content": "<p>Yeah my best guess is something changed with the build step wanting to write to the local directory.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1620244,
      "author_name": "dragon zhang",
      "author_url": "",
      "post_date": "2021-12-16T15:10:47.077000",
      "content": "<p>just fix it based on the error message.  simply It is about path and permission.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1611231,
      "author_name": "datasaurus",
      "author_url": "",
      "post_date": "2021-12-07T19:20:21.790000",
      "content": "<p><a href=\"https://www.kaggle.com/addisonhoward\" target=\"_blank\">@addisonhoward</a> Do you know if something is different on the current Docker image?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1608555,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-12-06T12:43:19.580000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1608390": "I'm trying to install `timm` and other packages using an offline [dataset](https://www.kaggle.com/kozodoi/timm-pytorch-image-models). My standard way of doing this like this:\n\n```\nimport subprocess\n\nwhls = [\n    \"../input/timm-pytorch-image-models/pytorch-image-models-master\",\n    # paths to other packages\n]\n\nfor w in whls:\n    print(\"Installing\", w)\n    subprocess.call([\"pip\", \"install\", w, \"--no-deps\", \"--upgrade\"])\n```\n\nI'm seeing this error:\n```\n  ERROR: Command errored out with exit status 1:\n   command: /opt/conda/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '\"'\"'/kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/setup.py'\"'\"'; __file__='\"'\"'/kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/setup.py'\"'\"';f = getattr(tokenize, '\"'\"'open'\"'\"', open)(__file__) if os.path.exists(__file__) else io.StringIO('\"'\"'from setuptools import setup; setup()'\"'\"');code = f.read().replace('\"'\"'\\r\\n'\"'\"', '\"'\"'\\n'\"'\"');f.close();exec(compile(code, __file__, '\"'\"'exec'\"'\"'))' bdist_wheel -d /tmp/pip-wheel-3kszrhie\n       cwd: /kaggle/input/timm-pytorch-image-models/pytorch-image-models-master/\n  Complete output (5 lines):\n  running bdist_wheel\n  running build\n  running build_py\n  creating build\n  error: could not create 'build': Read-only file system\n  ----------------------------------------\n  ERROR: Failed building wheel for timm\n```\n\nThe same code snippet works in my notebook for the Petfinder comp (2021-11-02 image)\n\nAnyone else seeing this with the 2021-12-01 notebook image? ",
    "1611246": "just copy the wheel into local directory, you cannot do any write operation on a dataset folder",
    "1620244": "just fix it based on the error message.  simply It is about path and permission.",
    "1611231": "@addisonhoward Do you know if something is different on the current Docker image?",
    "1608555": ""
  }
}