janosh / pymatviz

A toolkit for visualizations in materials informatics.
https://janosh.github.io/pymatviz
MIT License
176 stars 16 forks source link

Unable to install with extras={test,export-figs,make-assets} on mac due to upstream issue with kaleido #216

Closed theochemtheo closed 2 months ago

theochemtheo commented 2 months ago

Hello,

I had trouble installing pymatviz when setting up matbench-discover today on my Mac due to the dependency on kaleido>=0.2 (thanks for both packages btw).

I believe this is due to an upstream mistake with the most recent release of kaleido, as detailed in this issue. In brief, they didn't include wheels for non-linux platforms in their most recent release (0.2.1post1).

I was able to fix this in my own fork by pinning to kaleido=0.2.1, which hopefully will only be necessary in the short term. I will open a PR including this fix, if you're open to that.

DanielYang59 commented 1 month ago

@theochemtheo thanks for reporting this, I'm being very curious as I cannot reproduce this on my MacOS machine. May I know what command you used to install pymatviz with extras? pip doesn't seem to pick that version as neither source distribution nor compatible binary distribution is available, perhaps you are using a python package manager other than pip?

theochemtheo commented 1 month ago

@DanielYang59 Thanks for your work on this project.

I was indeed not using pip. I can't remember precisely what I did, but it included uv pip install -r pyproject.toml --extra test and uv sync --extra test.

DanielYang59 commented 1 month ago

Thanks for the input! I could recreate this issue with uv:

>>> uv pip install -r pyproject.toml --extra test
# be sure to remove the "uv.lock" cache file
>>> uv sync --extra test
error: distribution kaleido==0.2.1.post1 @ registry+https://pypi.org/simple can't be installed because it doesn't have a source distribution or wheel for the current platform

I might look deeper into this because it seems the resolver for uv is not working property.