Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

micropip.freeze() fails when deps=False #157

Closed
mscolnick opened this issue Nov 11, 2024 · 2 comments · Fixed by #187
Closed

micropip.freeze() fails when deps=False #157

mscolnick opened this issue Nov 11, 2024 · 2 comments · Fixed by #187
Labels
bug Something isn't working

Comments

@mscolnick
Copy link

Repro code:

import micropip
await micropip.install(["marimo-base"], deps=False)
micropip.freeze()

Stack trace:

  File "/session/metadata/entry.py", line 31, in root
    micropip.freeze()
  File "/session/lib/python3.12/site-packages/micropip/_commands/freeze.py", line 37, in freeze
    fix_package_dependencies(name)
  File "/session/lib/python3.12/site-packages/micropip/_utils.py", line 255, in fix_package_dependencies
    fix_package_dependencies(req_name, extras=list(req_extras))
  File "/session/lib/python3.12/site-packages/micropip/_utils.py", line 214, in fix_package_dependencies
    dist = Distribution.from_name(package_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python312.zip/importlib/metadata/__init__.py", line 399, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for click
@agriyakhetarpal agriyakhetarpal added the bug Something isn't working label Nov 11, 2024
@agriyakhetarpal agriyakhetarpal linked a pull request Feb 2, 2025 that will close this issue
1 task
@agriyakhetarpal
Copy link
Member

Hi @mscolnick, thanks for the report!! I think this is the same issue as #180, as the installation failed when the deps argument was set to False, and no metadata was found for the package as it wasn't installed. This should be fixed with #187 (I double-checked in a CI environment via #196), which has been released with version 0.9.0 today.

I'm trying to update micropip to the new version in Pyodide via pyodide/pyodide#5404.

Please let me know in case any other problems arise when micropip 0.9 is available. I'll mark this issue as closed for now. :)

@mscolnick
Copy link
Author

thank you @agriyakhetarpal!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants