-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Coming from pyodide/pyodide#5603 (comment) and, as suggested by @hoodmane, here the issue:
- when an explicit version of a package is specified in the list, if the same package without version, or any other package that depends on
pkgis present, the default version specified in theyamlfile becomes theimport pkg - when it comes to multiple packages at once, there is no solution to this, example:
micropip.install("fsspec ==2025.3.2", "fastparquet")wherefastparquethasfsspecas dependency, both current2024.3.1and2025.3.2are downloaded but importingfsspecwill always provide the indirectly resolved package instead of the explicitly required2025.3.2 - if packages are loaded in different steps, everything works as expected
# this always brings in both but fsspec will be 2024.3.1
micropip.install(["fsspec ==2025.3.2", "fsspec"])
# fsspec 2024.3.1
# doing this will download `fsspec` once with the desired version
micropip.install("fsspec ==2025.3.2")
micropip.install("fsspec") # no-op
# fsspec 2025.3.2The same goes for mixed packages:
micropip.install(["fsspec ==2025.3.2", "fastparquet"])
# fsspec 2024.3.1 imported by parquet as dependency
# this works as expected
micropip.install("fsspec ==2025.3.2")
micropip,install("fastparquet")
# fsspec 2025.3.2 and not re-imported via fastparquetThanks in advance for looking into this!
danyeaw and ryanking13
Metadata
Metadata
Assignees
Labels
No labels