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

Runtime Error when trying to start plugin on M2 Chip #4

Open
jenna-tomkinson opened this issue Jul 26, 2023 · 1 comment
Open

Runtime Error when trying to start plugin on M2 Chip #4

jenna-tomkinson opened this issue Jul 26, 2023 · 1 comment
Assignees

Comments

@jenna-tomkinson
Copy link

Problem

I was excited to look into the BaSiCPy plugin for napari but I have run into two different errors that states:

RuntimeError: Failed to import command at 'napari_basicpy._widget:BasicWidget': partially initialized module 'jax' has no attribute 'version' (most likely due to a circular import)
RuntimeError: Failed to import command at 'napari_basicpy._widget:BasicWidget': This version of jaxlib was built using AVX instructions, which your CPU and/or operating system do not support. You may be able work around this issue by building jaxlib from source.

It looks like the jaxlib package is the issue. When looking at this repo, I do not see a solution for this. But, there is a solution on the Python package version of BaSiCPy's Github: https://github.com/peng-lab/BaSiCPy.

Solution

It would also be helpful to include this solution (even though it is specific to M1 chips) on this repo.

pip install "jax[cpu]==0.3.22" jaxlib

But, this might not be the correct solution when using napari or for the M2 chip. I would love to know if this above solution referenced in the other repo also applies here.

@yfukai yfukai self-assigned this Aug 1, 2023
@yfukai
Copy link
Contributor

yfukai commented Aug 1, 2023

Thanks for this report @jenna-tomkinson! I found

pip install "jax[cpu]==0.3.22" jaxlib

actually does not help solve the problem (in M1 mac) but we need to install jax and jaxlib from conda-forge.

conda install -c jax jaxlib

We'll update the documents!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants