Pointblank doesn't import properly into marimo WASM notebooks because of a narwhals packaging conflict
This throws the following error.
Traceback (most recent call last):
File "/lib/python3.12/site-packages/marimo/_runtime/executor.py", line 112, in execute_cell_async
await eval(cell.body, glbls)
Cell
marimo://notebook.py#cell=cell-0
, line 10, in <module>
await micropip.install("pointblank")
File "/lib/python3.12/site-packages/micropip/package_manager.py", line 133, in install
return await install(
^^^^^^^^^^^^^^
File "/lib/python3.12/site-packages/micropip/install.py", line 53, in install
await transaction.gather_requirements(requirements)
File "/lib/python3.12/site-packages/micropip/transaction.py", line 55, in gather_requirements
await asyncio.gather(*requirement_promises)
File "/lib/python3.12/site-packages/micropip/transaction.py", line 62, in add_requirement
return await self.add_requirement_inner(Requirement(req))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.12/site-packages/micropip/transaction.py", line 152, in add_requirement_inner
await self._add_requirement_from_package_index(req)
File "/lib/python3.12/site-packages/micropip/transaction.py", line 214, in _add_requirement_from_package_index
await self.add_wheel(wheel, req.extras, specifier=str(req.specifier))
File "/lib/python3.12/site-packages/micropip/transaction.py", line 262, in add_wheel
await asyncio.gather(
File "/lib/python3.12/site-packages/micropip/transaction.py", line 55, in gather_requirements
await asyncio.gather(*requirement_promises)
File "/lib/python3.12/site-packages/micropip/transaction.py", line 59, in add_requirement
return await self.add_requirement_inner(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.12/site-packages/micropip/transaction.py", line 141, in add_requirement_inner
satisfied, ver = self.check_version_satisfied(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.12/site-packages/micropip/transaction.py", line 86, in check_version_satisfied
raise ValueError(
ValueError: Requested 'narwhals>=1.41.0', but narwhals==1.24.1 is already installed
You should be able to play with Pointblank in WASM/Pyodide marimo notebooks.
Add any other context about the problem here.
Prework
Description
Pointblank doesn't import properly into marimo WASM notebooks because of a narwhals packaging conflict
Reproducible example
The following code in marimo
This throws the following error.
You can try my example here
https://marimo.io/p/@paddy-mullen/notebook-f9ojwj
Expected result
You should be able to play with Pointblank in WASM/Pyodide marimo notebooks.
Development environment
Additional context
Add any other context about the problem here.