{
  "id": 666213,
  "title": "How do we downgrade our environment?",
  "url": "/competitions/vesuvius-challenge-surface-detection/discussion/666213",
  "author_name": "",
  "post_date": "2026-01-05T21:10:13.433250300Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I run the following code for using <a href=\"https://www.kaggle.com/code/sohier/vesuvius-2025-metric-demo/notebook\" target=\"_blank\">the validation metric</a>. </p>\n<pre><code>import glob\nimport importlib\nimport os\nimport subprocess\nimport sys\nimport numpy as np\nimport pandas as pd\nfrom PIL import Image, ImageSequence\n\nclass ParticipantVisibleError(Exception):\n    pass\n\n\nclass HostVisibleError(Exception):\n    pass\n\ndef install_dependencies():\n    \"\"\"On Kaggle, the topometrics library must be installed during the run. This function handles the entire process.\"\"\"\n    try:\n        import topometrics.leaderboard\n\n        return None\n    # The broad exception is necessary as the initial import can fail for multiple reasons.\n    except:\n        pass\n\n    resources_dir = '/kaggle/input/vesuvius-metric-resources'\n    install_dir = '/kaggle/working/topological-metrics-kaggle'\n\n    try:\n        subprocess.run(\n            f'cd {resources_dir} &amp;&amp; uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt',\n            shell=True,\n            check=True,\n        )\n        subprocess.run(f'cd /kaggle/working &amp;&amp; cp -r {resources_dir}/topological-metrics-kaggle .', shell=True, check=True)\n        subprocess.run(\n            f'cd {install_dir} &amp;&amp; chmod +x scripts/setup_submodules.sh scripts/build_betti.sh &amp;&amp; make build-betti',\n            shell=True,\n            check=True,\n        )\n        subprocess.run(\n            f'cd {install_dir} &amp;&amp; uv pip install -e . --no-deps --no-index --no-build-isolation -v',\n            shell=True,\n            check=True,\n        )\n        # Add the new library to Python's path and invalidate caches to ensure it's found.\n        sys.path.append('/kaggle/working/topological-metrics-kaggle/src')\n        importlib.invalidate_caches()\n\n    except Exception as err:\n        raise HostVisibleError(f'Failed to install topometrics library: {err}')\ninstall_dependencies()\n</code></pre>\n<p>However the following error occured. </p>\n<pre><code>Using Python 3.12.12 environment at: /usr\n  × No solution found when resolving dependencies:\n  ╰─▶ Because numpy==1.26.4 has no wheels with a matching Python ABI tag\n      (e.g., `cp312`) and you require numpy==1.26.4, we can conclude that your\n      requirements are unsatisfiable.\n\n      hint: You require CPython 3.12 (`cp312`), but we only found wheels for\n      `numpy` (v1.26.4) with the following Python ABI tag: `cp311`\n---------------------------------------------------------------------------\nCalledProcessError                        Traceback (most recent call last)\n/tmp/ipykernel_56/30325852.py in install_dependencies()\n     30     try:\n---&gt; 31         subprocess.run(\n     32             f'cd {resources_dir} &amp;&amp; uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt',\n\n/usr/lib/python3.12/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)\n    570         if check and retcode:\n--&gt; 571             raise CalledProcessError(retcode, process.args,\n    572                                      output=stdout, stderr=stderr)\n\nCalledProcessError: Command 'cd /kaggle/input/vesuvius-metric-resources &amp;&amp; uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt' returned non-zero exit status 1.\n\nDuring handling of the above exception, another exception occurred:\n\nHostVisibleError                          Traceback (most recent call last)\n/tmp/ipykernel_56/30325852.py in &lt;cell line: 0&gt;()\n     51     except Exception as err:\n     52         raise HostVisibleError(f'Failed to install topometrics library: {err}')\n---&gt; 53 install_dependencies()\n\n/tmp/ipykernel_56/30325852.py in install_dependencies()\n     50 \n     51     except Exception as err:\n---&gt; 52         raise HostVisibleError(f'Failed to install topometrics library: {err}')\n     53 install_dependencies()\n\nHostVisibleError: Failed to install topometrics library: Command 'cd /kaggle/input/vesuvius-metric-resources &amp;&amp; uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt' returned non-zero exit status 1.\n</code></pre>\n<p>So I wanna downgrade my current environment on Kaggle notebook. Please tell me the way to deal with the error.</p>",
  "messages": [
    {
      "id": "3386795",
      "postDate": "01/05/2026 21:10:13",
      "content": "<p>I run the following code for using <a href=\"https://www.kaggle.com/code/sohier/vesuvius-2025-metric-demo/notebook\" target=\"_blank\">the validation metric</a>. </p>\n<pre><code>import glob\nimport importlib\nimport os\nimport subprocess\nimport sys\nimport numpy as np\nimport pandas as pd\nfrom PIL import Image, ImageSequence\n\nclass ParticipantVisibleError(Exception):\n    pass\n\n\nclass HostVisibleError(Exception):\n    pass\n\ndef install_dependencies():\n    \"\"\"On Kaggle, the topometrics library must be installed during the run. This function handles the entire process.\"\"\"\n    try:\n        import topometrics.leaderboard\n\n        return None\n    # The broad exception is necessary as the initial import can fail for multiple reasons.\n    except:\n        pass\n\n    resources_dir = '/kaggle/input/vesuvius-metric-resources'\n    install_dir = '/kaggle/working/topological-metrics-kaggle'\n\n    try:\n        subprocess.run(\n            f'cd {resources_dir} &amp;&amp; uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt',\n            shell=True,\n            check=True,\n        )\n        subprocess.run(f'cd /kaggle/working &amp;&amp; cp -r {resources_dir}/topological-metrics-kaggle .', shell=True, check=True)\n        subprocess.run(\n            f'cd {install_dir} &amp;&amp; chmod +x scripts/setup_submodules.sh scripts/build_betti.sh &amp;&amp; make build-betti',\n            shell=True,\n            check=True,\n        )\n        subprocess.run(\n            f'cd {install_dir} &amp;&amp; uv pip install -e . --no-deps --no-index --no-build-isolation -v',\n            shell=True,\n            check=True,\n        )\n        # Add the new library to Python's path and invalidate caches to ensure it's found.\n        sys.path.append('/kaggle/working/topological-metrics-kaggle/src')\n        importlib.invalidate_caches()\n\n    except Exception as err:\n        raise HostVisibleError(f'Failed to install topometrics library: {err}')\ninstall_dependencies()\n</code></pre>\n<p>However the following error occured. </p>\n<pre><code>Using Python 3.12.12 environment at: /usr\n  × No solution found when resolving dependencies:\n  ╰─▶ Because numpy==1.26.4 has no wheels with a matching Python ABI tag\n      (e.g., `cp312`) and you require numpy==1.26.4, we can conclude that your\n      requirements are unsatisfiable.\n\n      hint: You require CPython 3.12 (`cp312`), but we only found wheels for\n      `numpy` (v1.26.4) with the following Python ABI tag: `cp311`\n---------------------------------------------------------------------------\nCalledProcessError                        Traceback (most recent call last)\n/tmp/ipykernel_56/30325852.py in install_dependencies()\n     30     try:\n---&gt; 31         subprocess.run(\n     32             f'cd {resources_dir} &amp;&amp; uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt',\n\n/usr/lib/python3.12/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)\n    570         if check and retcode:\n--&gt; 571             raise CalledProcessError(retcode, process.args,\n    572                                      output=stdout, stderr=stderr)\n\nCalledProcessError: Command 'cd /kaggle/input/vesuvius-metric-resources &amp;&amp; uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt' returned non-zero exit status 1.\n\nDuring handling of the above exception, another exception occurred:\n\nHostVisibleError                          Traceback (most recent call last)\n/tmp/ipykernel_56/30325852.py in &lt;cell line: 0&gt;()\n     51     except Exception as err:\n     52         raise HostVisibleError(f'Failed to install topometrics library: {err}')\n---&gt; 53 install_dependencies()\n\n/tmp/ipykernel_56/30325852.py in install_dependencies()\n     50 \n     51     except Exception as err:\n---&gt; 52         raise HostVisibleError(f'Failed to install topometrics library: {err}')\n     53 install_dependencies()\n\nHostVisibleError: Failed to install topometrics library: Command 'cd /kaggle/input/vesuvius-metric-resources &amp;&amp; uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt' returned non-zero exit status 1.\n</code></pre>\n<p>So I wanna downgrade my current environment on Kaggle notebook. Please tell me the way to deal with the error.</p>",
      "rawMarkdown": "I run the following code for using [the validation metric](https://www.kaggle.com/code/sohier/vesuvius-2025-metric-demo/notebook). \n\n```\nimport glob\nimport importlib\nimport os\nimport subprocess\nimport sys\nimport numpy as np\nimport pandas as pd\nfrom PIL import Image, ImageSequence\n\nclass ParticipantVisibleError(Exception):\n    pass\n\n\nclass HostVisibleError(Exception):\n    pass\n\ndef install_dependencies():\n    \"\"\"On Kaggle, the topometrics library must be installed during the run. This function handles the entire process.\"\"\"\n    try:\n        import topometrics.leaderboard\n\n        return None\n    # The broad exception is necessary as the initial import can fail for multiple reasons.\n    except:\n        pass\n\n    resources_dir = '/kaggle/input/vesuvius-metric-resources'\n    install_dir = '/kaggle/working/topological-metrics-kaggle'\n\n    try:\n        subprocess.run(\n            f'cd {resources_dir} && uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt',\n            shell=True,\n            check=True,\n        )\n        subprocess.run(f'cd /kaggle/working && cp -r {resources_dir}/topological-metrics-kaggle .', shell=True, check=True)\n        subprocess.run(\n            f'cd {install_dir} && chmod +x scripts/setup_submodules.sh scripts/build_betti.sh && make build-betti',\n            shell=True,\n            check=True,\n        )\n        subprocess.run(\n            f'cd {install_dir} && uv pip install -e . --no-deps --no-index --no-build-isolation -v',\n            shell=True,\n            check=True,\n        )\n        # Add the new library to Python's path and invalidate caches to ensure it's found.\n        sys.path.append('/kaggle/working/topological-metrics-kaggle/src')\n        importlib.invalidate_caches()\n\n    except Exception as err:\n        raise HostVisibleError(f'Failed to install topometrics library: {err}')\ninstall_dependencies()\n```\n\nHowever the following error occured. \n\n```\nUsing Python 3.12.12 environment at: /usr\n  × No solution found when resolving dependencies:\n  ╰─▶ Because numpy==1.26.4 has no wheels with a matching Python ABI tag\n      (e.g., `cp312`) and you require numpy==1.26.4, we can conclude that your\n      requirements are unsatisfiable.\n\n      hint: You require CPython 3.12 (`cp312`), but we only found wheels for\n      `numpy` (v1.26.4) with the following Python ABI tag: `cp311`\n---------------------------------------------------------------------------\nCalledProcessError                        Traceback (most recent call last)\n/tmp/ipykernel_56/30325852.py in install_dependencies()\n     30     try:\n---> 31         subprocess.run(\n     32             f'cd {resources_dir} && uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt',\n\n/usr/lib/python3.12/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)\n    570         if check and retcode:\n--> 571             raise CalledProcessError(retcode, process.args,\n    572                                      output=stdout, stderr=stderr)\n\nCalledProcessError: Command 'cd /kaggle/input/vesuvius-metric-resources && uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt' returned non-zero exit status 1.\n\nDuring handling of the above exception, another exception occurred:\n\nHostVisibleError                          Traceback (most recent call last)\n/tmp/ipykernel_56/30325852.py in <cell line: 0>()\n     51     except Exception as err:\n     52         raise HostVisibleError(f'Failed to install topometrics library: {err}')\n---> 53 install_dependencies()\n\n/tmp/ipykernel_56/30325852.py in install_dependencies()\n     50 \n     51     except Exception as err:\n---> 52         raise HostVisibleError(f'Failed to install topometrics library: {err}')\n     53 install_dependencies()\n\nHostVisibleError: Failed to install topometrics library: Command 'cd /kaggle/input/vesuvius-metric-resources && uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt' returned non-zero exit status 1.\n```\n\nSo I wanna downgrade my current environment on Kaggle notebook. Please tell me the way to deal with the error.",
      "votes": null
    },
    {
      "id": "3386819",
      "postDate": "01/05/2026 22:30:37",
      "content": "<p>Use an older Kaggle kernel with the relevant environment - fork the kernel and you will be done <a href=\"https://www.kaggle.com/ariafschneider\" target=\"_blank\">@ariafschneider</a> </p>",
      "rawMarkdown": "Use an older Kaggle kernel with the relevant environment - fork the kernel and you will be done @ariafschneider",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3386819,
      "author_name": "ravi20076",
      "author_url": "",
      "post_date": "01/05/2026 22:30:37",
      "content": "<p>Use an older Kaggle kernel with the relevant environment - fork the kernel and you will be done <a href=\"https://www.kaggle.com/ariafschneider\" target=\"_blank\">@ariafschneider</a> </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3386795": "I run the following code for using [the validation metric](https://www.kaggle.com/code/sohier/vesuvius-2025-metric-demo/notebook). \n\n```\nimport glob\nimport importlib\nimport os\nimport subprocess\nimport sys\nimport numpy as np\nimport pandas as pd\nfrom PIL import Image, ImageSequence\n\nclass ParticipantVisibleError(Exception):\n    pass\n\n\nclass HostVisibleError(Exception):\n    pass\n\ndef install_dependencies():\n    \"\"\"On Kaggle, the topometrics library must be installed during the run. This function handles the entire process.\"\"\"\n    try:\n        import topometrics.leaderboard\n\n        return None\n    # The broad exception is necessary as the initial import can fail for multiple reasons.\n    except:\n        pass\n\n    resources_dir = '/kaggle/input/vesuvius-metric-resources'\n    install_dir = '/kaggle/working/topological-metrics-kaggle'\n\n    try:\n        subprocess.run(\n            f'cd {resources_dir} && uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt',\n            shell=True,\n            check=True,\n        )\n        subprocess.run(f'cd /kaggle/working && cp -r {resources_dir}/topological-metrics-kaggle .', shell=True, check=True)\n        subprocess.run(\n            f'cd {install_dir} && chmod +x scripts/setup_submodules.sh scripts/build_betti.sh && make build-betti',\n            shell=True,\n            check=True,\n        )\n        subprocess.run(\n            f'cd {install_dir} && uv pip install -e . --no-deps --no-index --no-build-isolation -v',\n            shell=True,\n            check=True,\n        )\n        # Add the new library to Python's path and invalidate caches to ensure it's found.\n        sys.path.append('/kaggle/working/topological-metrics-kaggle/src')\n        importlib.invalidate_caches()\n\n    except Exception as err:\n        raise HostVisibleError(f'Failed to install topometrics library: {err}')\ninstall_dependencies()\n```\n\nHowever the following error occured. \n\n```\nUsing Python 3.12.12 environment at: /usr\n  × No solution found when resolving dependencies:\n  ╰─▶ Because numpy==1.26.4 has no wheels with a matching Python ABI tag\n      (e.g., `cp312`) and you require numpy==1.26.4, we can conclude that your\n      requirements are unsatisfiable.\n\n      hint: You require CPython 3.12 (`cp312`), but we only found wheels for\n      `numpy` (v1.26.4) with the following Python ABI tag: `cp311`\n---------------------------------------------------------------------------\nCalledProcessError                        Traceback (most recent call last)\n/tmp/ipykernel_56/30325852.py in install_dependencies()\n     30     try:\n---> 31         subprocess.run(\n     32             f'cd {resources_dir} && uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt',\n\n/usr/lib/python3.12/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)\n    570         if check and retcode:\n--> 571             raise CalledProcessError(retcode, process.args,\n    572                                      output=stdout, stderr=stderr)\n\nCalledProcessError: Command 'cd /kaggle/input/vesuvius-metric-resources && uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt' returned non-zero exit status 1.\n\nDuring handling of the above exception, another exception occurred:\n\nHostVisibleError                          Traceback (most recent call last)\n/tmp/ipykernel_56/30325852.py in <cell line: 0>()\n     51     except Exception as err:\n     52         raise HostVisibleError(f'Failed to install topometrics library: {err}')\n---> 53 install_dependencies()\n\n/tmp/ipykernel_56/30325852.py in install_dependencies()\n     50 \n     51     except Exception as err:\n---> 52         raise HostVisibleError(f'Failed to install topometrics library: {err}')\n     53 install_dependencies()\n\nHostVisibleError: Failed to install topometrics library: Command 'cd /kaggle/input/vesuvius-metric-resources && uv pip install --no-index --find-links=wheels -r topological-metrics-kaggle/requirements.txt' returned non-zero exit status 1.\n```\n\nSo I wanna downgrade my current environment on Kaggle notebook. Please tell me the way to deal with the error.",
    "3386819": "Use an older Kaggle kernel with the relevant environment - fork the kernel and you will be done @ariafschneider"
  },
  "source": "meta"
}