Pin specific library versions in pyscript py-env

295 Views Asked by At

How to specify the library version in pyscript's py-venv tag?

The docs are pretty clear on how to import libraries:

<py-env>
    - bokeh
    - numpy
    - paths:
      - /utils.py
</py-env>

But how do you pin particular library versions? Adding stuff like numpy==1.21.6 seems to break it.

1

There are 1 best solutions below

4
On BEST ANSWER

Looking at some examples in the github repository of pyscript(see e.g. here) it should be done as follows:

<py-env>
 - bokeh
 - numpy
 - panel==0.13.1a2 # here is a specific version of a package
</py-env>