question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RuntimeError when using cell2location on MacOS (M1)

See original GitHub issue

Hi,

I follow the instructions from the [scvi-tools tutorial || Quick START TUTORIAL || Mapping human lymph node cell types to 10X Visium with Cell2location] and download all required package of cell2location successfully. (https://cell2location.readthedocs.io/en/latest/notebooks/cell2location_tutorial.html)


###PROBLEM

However, I encountered the following error when running the code on Python.

RuntimeError: 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 happened when reading

import jax

### MY THINKING

I guess that it occurred because of M1, I tried installing jaxlib from source by the following link, (https://jax.readthedocs.io/en/latest/developer.html#building-from-source) , but failed. I am struggling for the issue and want to find an effective way to tackle with the problem.

do you have encountered such an issue? could you please give me some suggestions?

Await your reply appreciatively!! Thanks a lot!!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sarahshuangcommented, Oct 14, 2022

Hi @adamgayoso , The problem is solved now, because I realize I didn’t install scvi-tools in the proper environment. Thanks a lot!!

1reaction
adamgayosocommented, Oct 14, 2022

The issue is likely related to using a version of python that is being interpreted via rosetta istead of a native M1 version of python. Cell2location will only work in the latter case (e.g., download an m1 version of homebrew, use that to install miniforge and then use conda to install scvi-tools, and then pip install cell2location)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · BayraktarLab/cell2location - GitHub
BayraktarLab / cell2location Public ... #221 opened last week by NicolasSompairac. 2 tasks done ... reloading data - RuntimeError: self.samples is missing, ...
Read more >
Common errors — cell2location documentation - Read the Docs
Training cell2location using cell2location.run_cell2location() on GPU takes forever (>50 hours). Please check that cell2location is actually using the GPU.
Read more >
EasyBuild v4.6.2 documentation (release 20221021.0)
set $FFT(W)_LIB_DIR to imkl-FFTW's lib path in build environment if usempi toolchain option is enabled (#4011); correctly identify Apple Silicon M1 as Arm...
Read more >
cell2location - PyPI
cell2location : High-throughput spatial mapping of cell types. ... If you use cell2location please cite our paper:.
Read more >
cell2location - Wellcome Sanger Institute
Cell2location maps the spatial distribution of cell types by integrating single-cell RNA-seq (scRNA-seq) and multi-cell spatial transcriptomic data from a given ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found