{
  "id": 549333,
  "title": "How to downgrade Keras version?",
  "url": "/competitions/jane-street-real-time-market-data-forecasting/discussion/549333",
  "author_name": "",
  "post_date": "2024-12-01T21:22:21.629228800Z",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I ran:</p>\n<p>!pip install -U keras==2.13.1<br>\nor<br>\n!pip install /kaggle/input/janekeras-v0/keras-2.13.1-py3-none-any.whl</p>\n<p>However, when I execute:</p>\n<p>from keras import layers<br>\nprint(keras.<strong>version</strong>)</p>\n<p>It outputs:</p>\n<p>3.3.3<br>\nI have already tried uninstalling and reinstalling, but it still shows version 3.3.3.</p>",
  "messages": [
    {
      "id": "3060581",
      "postDate": "12/01/2024 21:22:21",
      "content": "<p>I ran:</p>\n<p>!pip install -U keras==2.13.1<br>\nor<br>\n!pip install /kaggle/input/janekeras-v0/keras-2.13.1-py3-none-any.whl</p>\n<p>However, when I execute:</p>\n<p>from keras import layers<br>\nprint(keras.<strong>version</strong>)</p>\n<p>It outputs:</p>\n<p>3.3.3<br>\nI have already tried uninstalling and reinstalling, but it still shows version 3.3.3.</p>",
      "rawMarkdown": "I ran:\n\n!pip install -U keras==2.13.1\nor\n!pip install /kaggle/input/janekeras-v0/keras-2.13.1-py3-none-any.whl\n\nHowever, when I execute:\n\nfrom keras import layers\nprint(keras.__version__)\n\nIt outputs:\n\n3.3.3\nI have already tried uninstalling and reinstalling, but it still shows version 3.3.3.",
      "votes": null
    },
    {
      "id": "3060978",
      "postDate": "12/02/2024 10:02:17",
      "content": "<p>looks ok. Missing some info but to me either:</p>\n<ol>\n<li>you're installing in a different python environment. running <code>!pip ...</code> in a notebook doesn't ensure you are installing in that notebook's environment</li>\n<li>you first import keras (or eg tensorflow which loads keras), then do the update. Since the old was loaded already the new installation does not automatically load. Even rerunning import keras will not do the trick, you need to get the order correct</li>\n</ol>",
      "rawMarkdown": "looks ok. Missing some info but to me either:\n1. you're installing in a different python environment. running `!pip ...` in a notebook doesn't ensure you are installing in that notebook's environment\n1. you first import keras (or eg tensorflow which loads keras), then do the update. Since the old was loaded already the new installation does not automatically load. Even rerunning import keras will not do the trick, you need to get the order correct",
      "votes": null
    },
    {
      "id": "3061250",
      "postDate": "12/02/2024 13:46:51",
      "content": "<p>That’s not the problem.</p>\n<p>If I enable internet access, the following commands work fine:<br>\n!pip uninstall -y keras tensorflow<br>\n!pip install keras==2.13.1 tensorflow==2.13.0<br>\nKeras version: 2.13.1<br>\nTensorFlow version: 2.13.0</p>\n<p>However, we don’t have internet access, so we need to download the .whl file. The versions I tested do not work in the Kaggle environment due to some incompatibility. For example:<br>\nERROR: tensorflow-2.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl is not a supported wheel on this platform.</p>",
      "rawMarkdown": "That’s not the problem.\n\nIf I enable internet access, the following commands work fine:\n!pip uninstall -y keras tensorflow\n!pip install keras==2.13.1 tensorflow==2.13.0\nKeras version: 2.13.1\nTensorFlow version: 2.13.0\n\n\nHowever, we don’t have internet access, so we need to download the .whl file. The versions I tested do not work in the Kaggle environment due to some incompatibility. For example:\nERROR: tensorflow-2.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl is not a supported wheel on this platform.",
      "votes": null
    },
    {
      "id": "3062060",
      "postDate": "12/03/2024 08:43:59",
      "content": "<p>ah…, you can create your own wheel then: <a href=\"url\" target=\"_blank\">https://stackoverflow.com/questions/11091623/how-to-install-packages-offline</a></p>",
      "rawMarkdown": "ah..., you can create your own wheel then: [https://stackoverflow.com/questions/11091623/how-to-install-packages-offline](url)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3060978,
      "author_name": "brtvandenbroeck",
      "author_url": "",
      "post_date": "12/02/2024 10:02:17",
      "content": "<p>looks ok. Missing some info but to me either:</p>\n<ol>\n<li>you're installing in a different python environment. running <code>!pip ...</code> in a notebook doesn't ensure you are installing in that notebook's environment</li>\n<li>you first import keras (or eg tensorflow which loads keras), then do the update. Since the old was loaded already the new installation does not automatically load. Even rerunning import keras will not do the trick, you need to get the order correct</li>\n</ol>",
      "votes": null,
      "replies": [
        {
          "id": 3061250,
          "author_name": "nandodmelo",
          "author_url": "",
          "post_date": "12/02/2024 13:46:51",
          "content": "<p>That’s not the problem.</p>\n<p>If I enable internet access, the following commands work fine:<br>\n!pip uninstall -y keras tensorflow<br>\n!pip install keras==2.13.1 tensorflow==2.13.0<br>\nKeras version: 2.13.1<br>\nTensorFlow version: 2.13.0</p>\n<p>However, we don’t have internet access, so we need to download the .whl file. The versions I tested do not work in the Kaggle environment due to some incompatibility. For example:<br>\nERROR: tensorflow-2.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl is not a supported wheel on this platform.</p>",
          "votes": null,
          "replies": [
            {
              "id": 3062060,
              "author_name": "brtvandenbroeck",
              "author_url": "",
              "post_date": "12/03/2024 08:43:59",
              "content": "<p>ah…, you can create your own wheel then: <a href=\"url\" target=\"_blank\">https://stackoverflow.com/questions/11091623/how-to-install-packages-offline</a></p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3060581": "I ran:\n\n!pip install -U keras==2.13.1\nor\n!pip install /kaggle/input/janekeras-v0/keras-2.13.1-py3-none-any.whl\n\nHowever, when I execute:\n\nfrom keras import layers\nprint(keras.__version__)\n\nIt outputs:\n\n3.3.3\nI have already tried uninstalling and reinstalling, but it still shows version 3.3.3.",
    "3060978": "looks ok. Missing some info but to me either:\n1. you're installing in a different python environment. running `!pip ...` in a notebook doesn't ensure you are installing in that notebook's environment\n1. you first import keras (or eg tensorflow which loads keras), then do the update. Since the old was loaded already the new installation does not automatically load. Even rerunning import keras will not do the trick, you need to get the order correct",
    "3061250": "That’s not the problem.\n\nIf I enable internet access, the following commands work fine:\n!pip uninstall -y keras tensorflow\n!pip install keras==2.13.1 tensorflow==2.13.0\nKeras version: 2.13.1\nTensorFlow version: 2.13.0\n\n\nHowever, we don’t have internet access, so we need to download the .whl file. The versions I tested do not work in the Kaggle environment due to some incompatibility. For example:\nERROR: tensorflow-2.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl is not a supported wheel on this platform.",
    "3062060": "ah..., you can create your own wheel then: [https://stackoverflow.com/questions/11091623/how-to-install-packages-offline](url)"
  },
  "source": "meta"
}