import micropip
URL = (
    # "https://anaconda.org/scikit-plots-wheels-staging-nightly/scikit-plots/{v}/download/"
    "https://pypi.anaconda.org/scikit-plots-wheels-staging-nightly/simple/scikit-plots/{v}/"
    "scikit_plots-{v}-cp312-cp312-pyodide_2024_0_wasm32.whl")
for v in ["0.5.dev0", "0.4.0.post11"]:
    try:
        await micropip.install(URL.format(v=v), keep_going=True)
        break  # success -> stop trying
    except Exception as e:
        print(f"install failed for {v}: {e}")
else:
    # runs only if the loop never hit 'break' (i.e., all installs failed)
    await micropip.install("scikit-plots==0.3.9rc3", keep_going=True)
import scikitplot as sp
print("scikit-plots version:", sp.__version__)
sp.show_versions()
