Error from import cell2locationSee original GitHub issue
Hi, I was just wondering whether anyone could interpret this error or give me any tips how to fix it? I’ve installed cell2location in a conda environment as per the instructions to do so manually but am getting this error upon trying to import it:
In : import sys ...: import scanpy as sc ...: import anndata ...: import pandas as pd ...: import numpy as np ...: import os ...: ...: data_type = 'float32' ...: ...: import cell2location ...: LoweringError: Failed in nopython mode pipeline (step: nopython mode backend) Storing i64 to ptr of i32 ('dim'). FE type int32 File "../../../.local/lib/python3.7/site-packages/umap/layouts.py", line 52: def rdist(x, y): <source elided> result = 0.0 dim = x.shape ^ During: lowering "dim = static_getitem(value=$8load_attr.2, index=0, index_var=$const10.3, fn=<built-in function getitem>)" at /home/camerongw/.local/lib/python3.7/site-packages/umap/layouts.py (52)
I’m using python-3.7.10.
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
I can’t reproduce this error, but it’s definitely something related to the
numba package. Are you using the
Could you please try the following?
conda update numba
I would strongly recommend using a separate conda environment for cell2location and other tools you are using.
If you are already doing that your error suggests that python uses
.local/lib/python3.7/site-packages/umap rather than conda environment. This is a common error in some HPC and can be solved by disabling the pip user site by adding this line to your
You also need to make sure that you active the conda environment, and that your
$PATH environmental variable contains path to the conda environment before the path to any other python installation.