Closed 911432 closed 4 months ago
The compatibility table is for the version of libraries running in the browser by a site visitor, and is strictly defined by the pyodide
version.
I don't know where the pyproject.toml
shown comes from: the host environment (running outside the browser, to build a site by the site owner) is compatible with (and tested against) python >=3.8
.
I ran on github codespases. pyproject.toml If you change 3.8 to 3.12, it will not run.
requires-python = ">=3.12"
I changed jupyterlab from 4.1.1 to 4.2.2. But I don't know why these messages are coming out.
INFO: pip is looking at multiple versions of jupyterlite-pyodide-kernel to determine which version is compatible with other requirements. This could take a while.
ERROR: Package 'jupyterlite-pyodide-kernel' requires a different Python: 3.10.13 not in '>=3.12'
codespases
I do not use or test against codespaces, so can't speak to what environment is provided there.
pyproject.toml
The linked file contains >=3.8
: this is correct, and verified in CI.
3.8 to 3.12, it will not run.
jupyterlite-pyodide-kernel 0.4.0a2
on PyPI will install happily on a python 3.8 installed via $PKG_MANAGER
on a "real" computer (not a browser). There is no reason to limit the site building environment to python 3.12, even if the version of CPython that runs in WebAssembly in the browser will be 3.12.
I solved it by entering the following command in the Github Codespace console:
sudo apt update && sudo add-apt-repository ppa:deadsnakes/ppa -y && npm install -g npm@latest && sudo apt install python3.12-full -y && python3.12 --version && sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 0 && sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.12 0 && python3.12 -m venv .venv && source .venv/bin/activate && python -m pip install -e ".[dev,docs,lint,test]" && pip install --upgrade pip
If using in a goormIDE, run the following command in an empty container:
sudo apt update -y && sudo apt purge python* -y && sudo apt-get install -y curl && curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh && sudo -E bash nodesource_setup.sh && sudo apt install nodejs -y && node -v && sudo npm install -g npm@latest && sudo apt install software-properties-common -y && sudo add-apt-repository ppa:deadsnakes/ppa -y && sudo apt update -y && sudo apt install python3.12-full -y && python3.12 --version && sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 0 && sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.12 0 && python --version && python3 --version && python3.12 -m venv .venv && source .venv/bin/activate && python -m pip install -e ".[dev,docs,lint,test]" && pip install --upgrade pip
I tried to upgrade jupyterlite-pyodide-kernel@0.40a3 to Python 3.12 according to README.md.
However, it fails with a console like below.