How to introduce xgboost in pyscript

Viewed 13

I found that the xgboost package exists in pyodide, but I can't import it in the of pyscript

  <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
  <script defer src="https://pyscript.net/alpha/pyscript.js"></script>
  <py-env>
    - numpy
    - matplotlib
    - pandas
    - scikit-learn
    - xgboost

  </py-env>

error: ValueError: Couldn't find a pure Python 3 wheel for 'xgboost'. You can use micropip.install(..., keep_going=True) to get a list of all packages with missing wheels.

1 Answers

As for "I found that the xgboost package exists in pyodide,", I think you mean to reference the announcement here of Pyodide 0.21.0. However, as Pyscript is built on top of Pyodide, it doesn't mean as a Pyscript user you immediately reap the benefits of an update to Pyodide.

I believe this discussion relates to your question and the code in the linked twitter thread shows you how you could use the 'unstable' release now.

Related