Python 3.13 failed to install jupyter

I am using Windows 10. I have Python 3.12.1 running in a virtual environment which still runs. I added Python 3.13.0 and started a new virtual environment for it. The virtual environment
was created and I used pip to install numpy, matplotlib and astropy with no problem. However,
when I tried to install jupyterlab using

python -m pip install jupyterlab

I received an error message:

Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]

  Cargo, the Rust package manager, is not installed or is not on PATH.
  This package requires Rust and Cargo to compile extensions. Install it through
  the system's package manager or via https://rustup.rs/

  Checking for Rust toolchain....
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I looked up Rust at https://rustup.rs/ but I am wondering why I need to install this or if something else is wrong.

That issue can arise when a pre-built version of the package is not available, and pip tries to build it instead of telling you it is not available. Python 3.13 was just released a few days ago so it is possible that Jupyterlab (or one of its dependencies) is not yet working with that version.

You probably do not want to install Rust or try to compile the package yourself as that will be complicated. More likely you just want to wait and try again in a few days or weeks and see if it worsk, as it may take a bit of time for all the packages needed for Jupyterlab become available on 3.13.

Thank makes sense. Thank you!