{
  "id": 401960,
  "title": "when Internet-off how to submission and  no dependent pacage polars",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/401960",
  "author_name": "",
  "post_date": "2023-04-16T02:36:38.552989500Z",
  "votes": 2,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I  find polars is very  interesting and useful when deal with dataframe. but kaggle competition environment not have the ploars package, when submmit the polars version,return the error \"no module named 'polars' \",and the internet must be off, how to save the denpendent pacakage problem? thanks very much</p>",
  "messages": [
    {
      "id": "2223226",
      "postDate": "04/16/2023 02:36:38",
      "content": "<p>I  find polars is very  interesting and useful when deal with dataframe. but kaggle competition environment not have the ploars package, when submmit the polars version,return the error \"no module named 'polars' \",and the internet must be off, how to save the denpendent pacakage problem? thanks very much</p>",
      "rawMarkdown": "I  find polars is very  interesting and useful when deal with dataframe. but kaggle competition environment not have the ploars package, when submmit the polars version,return the error \"no module named 'polars' \",and the internet must be off, how to save the denpendent pacakage problem? thanks very much",
      "votes": null
    },
    {
      "id": "2224757",
      "postDate": "04/17/2023 16:22:47",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/empkiros\" target=\"_blank\">@empkiros</a> , you should be able to use polars simply with</p>\n<p>import polars as pl</p>",
      "rawMarkdown": "Hi @empkiros , you should be able to use polars simply with\n\nimport polars as pl",
      "votes": null
    },
    {
      "id": "2226330",
      "postDate": "04/18/2023 20:56:52",
      "content": "<p>If you're working running a notebook for a competition you need to also submit the code of the package if it is not fully installed (as a Kaggle dataset)</p>\n<p><strong>To do this, do the following:</strong></p>\n<ul>\n<li><p><strong>Create a new notebook or script:</strong><br>\nTo install the package and later on copy it's code.</p></li>\n<li><p><strong>Create a custom directory:</strong></p></li>\n<li><p>Navigate to the root directory by using <code>os.chdir('/')</code> and then create the directory <code>workingdir/python_modules</code> by running <code>!mkdir -p workingdir/python_modules</code>.</p></li>\n<li><p><strong>Download the pacakge content to the custom folder:</strong><br>\nAfter the folder has been created, moving package to the new <code>workingdir/python_modules</code> directory is essential. Use the command !pip install  -t .</p></li>\n<li><p><strong>Zip the custom directory:</strong><br>\nZip the <code>workingdir</code> directory at the root and download it.</p></li>\n<li><p><strong>Upload as a Kaggle dataset:</strong><br>\nNow upload it as a new Kaggle dataset.</p></li>\n<li><p><strong>Import the dataset into your notebook:</strong><br>\nAnd then add the path of the package code to <code>sys.path</code> and you should be able to <code>import</code> it normally.</p></li>\n</ul>\n<p>Your code should will work locally also during submission when you have no internet.</p>\n<blockquote>\n  <p>Just remember to test all of this enough time before the end of the competition so you won't get stuck without the package.</p>\n</blockquote>\n<p>The Devastator.</p>",
      "rawMarkdown": "If you're working running a notebook for a competition you need to also submit the code of the package if it is not fully installed (as a Kaggle dataset)\n\n**To do this, do the following:**\n\n- **Create a new notebook or script:**\nTo install the package and later on copy it's code.\n\n- **Create a custom directory:**\n- Navigate to the root directory by using `os.chdir('/')` and then create the directory `workingdir/python_modules` by running `!mkdir -p workingdir/python_modules`.\n\n- **Download the pacakge content to the custom folder:**\nAfter the folder has been created, moving package to the new `workingdir/python_modules` directory is essential. Use the command !pip install <package_name> -t <path/to/new_folder>.\n\n- **Zip the custom directory:**\nZip the `workingdir` directory at the root and download it.\n\n- **Upload as a Kaggle dataset:**\nNow upload it as a new Kaggle dataset.\n\n- **Import the dataset into your notebook:**\nAnd then add the path of the package code to `sys.path` and you should be able to `import` it normally.\n\nYour code should will work locally also during submission when you have no internet.\n\n> Just remember to test all of this enough time before the end of the competition so you won't get stuck without the package.\n\nThe Devastator.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2224757,
      "author_name": "gehallak",
      "author_url": "",
      "post_date": "04/17/2023 16:22:47",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/empkiros\" target=\"_blank\">@empkiros</a> , you should be able to use polars simply with</p>\n<p>import polars as pl</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2226330,
      "author_name": "thedevastator",
      "author_url": "",
      "post_date": "04/18/2023 20:56:52",
      "content": "<p>If you're working running a notebook for a competition you need to also submit the code of the package if it is not fully installed (as a Kaggle dataset)</p>\n<p><strong>To do this, do the following:</strong></p>\n<ul>\n<li><p><strong>Create a new notebook or script:</strong><br>\nTo install the package and later on copy it's code.</p></li>\n<li><p><strong>Create a custom directory:</strong></p></li>\n<li><p>Navigate to the root directory by using <code>os.chdir('/')</code> and then create the directory <code>workingdir/python_modules</code> by running <code>!mkdir -p workingdir/python_modules</code>.</p></li>\n<li><p><strong>Download the pacakge content to the custom folder:</strong><br>\nAfter the folder has been created, moving package to the new <code>workingdir/python_modules</code> directory is essential. Use the command !pip install  -t .</p></li>\n<li><p><strong>Zip the custom directory:</strong><br>\nZip the <code>workingdir</code> directory at the root and download it.</p></li>\n<li><p><strong>Upload as a Kaggle dataset:</strong><br>\nNow upload it as a new Kaggle dataset.</p></li>\n<li><p><strong>Import the dataset into your notebook:</strong><br>\nAnd then add the path of the package code to <code>sys.path</code> and you should be able to <code>import</code> it normally.</p></li>\n</ul>\n<p>Your code should will work locally also during submission when you have no internet.</p>\n<blockquote>\n  <p>Just remember to test all of this enough time before the end of the competition so you won't get stuck without the package.</p>\n</blockquote>\n<p>The Devastator.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2223226": "I  find polars is very  interesting and useful when deal with dataframe. but kaggle competition environment not have the ploars package, when submmit the polars version,return the error \"no module named 'polars' \",and the internet must be off, how to save the denpendent pacakage problem? thanks very much",
    "2224757": "Hi @empkiros , you should be able to use polars simply with\n\nimport polars as pl",
    "2226330": "If you're working running a notebook for a competition you need to also submit the code of the package if it is not fully installed (as a Kaggle dataset)\n\n**To do this, do the following:**\n\n- **Create a new notebook or script:**\nTo install the package and later on copy it's code.\n\n- **Create a custom directory:**\n- Navigate to the root directory by using `os.chdir('/')` and then create the directory `workingdir/python_modules` by running `!mkdir -p workingdir/python_modules`.\n\n- **Download the pacakge content to the custom folder:**\nAfter the folder has been created, moving package to the new `workingdir/python_modules` directory is essential. Use the command !pip install <package_name> -t <path/to/new_folder>.\n\n- **Zip the custom directory:**\nZip the `workingdir` directory at the root and download it.\n\n- **Upload as a Kaggle dataset:**\nNow upload it as a new Kaggle dataset.\n\n- **Import the dataset into your notebook:**\nAnd then add the path of the package code to `sys.path` and you should be able to `import` it normally.\n\nYour code should will work locally also during submission when you have no internet.\n\n> Just remember to test all of this enough time before the end of the competition so you won't get stuck without the package.\n\nThe Devastator."
  },
  "source": "meta"
}