Uh oh!
There was an error while loading. Please reload this page.
fix: disable packages cache when local wheels are detected - #184
Conversation
When local .whl files are specified in the packages list, their dependencies fail to resolve on subsequent page loads because micropip.freeze() stores stale references in IndexedDB. This change automatically sets packages_cache to "never" when local wheels are detected (paths starting with ./, ../, /, emfs://, file://, or URLs ending in .whl). Users can still opt into caching with packages_cache = "all".
WebReflection
commented
Jul 20, 2026
I think we should freeze the VFS into IndexedDB instead of using micropip because this problem has been coming up so many times already ... but this seems sensible, will have a look but I am on vacation right now, not sure if I'll manage before the 27th 'cause it needs a release via PyScript. |
Uh oh!
There was an error while loading. Please reload this page.
Archmonger
commented
Jul 21, 2026
Agreed. I'm considering this a band-aid fix while the team decides the best direction to solve this. This isn't ideal but at least prevents unexpected broken functionality (from a user-perspective). I would assume this is worthy of creating a follow-up issue ticket to track and discuss future plans. |
Uh oh!
There was an error while loading. Please reload this page.
WebReflection
commented
Jul 29, 2026
@Archmonger this is up and running but not published yet as PyScript ... which is coming next |
Description
Fixespyscript/pyscript#2282
When local .whl files are specified in the
packageslist, their dependencies fail to resolve on subsequent page loads becausemicropip.freeze()stores stale absolute or virtual filesystem references in IndexedDB. On the next page load, the frozen lockfile is restored instead of runningmicropip.install(), causingModuleNotFoundErrorfor the wheel's dependencies.This is somewhat of a band-aid fix, based on the following response:
Solution
This change automatically sets
packages_cacheto'never'when local wheels are detected in the packages array. Local wheels are identified by:./,../,/,emfs://,file://.whlUsers can still explicitly opt into caching with
packages_cache = "all".Related
"packages"to a localwheelcauses dependency resolution failure pyscript#2282