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

GimmeMotifs installed but can't install celloracle because of 'Failed building wheel for gimmemotifs' #202

Open
jianwu1 opened this issue May 25, 2024 · 1 comment

Comments

@jianwu1
Copy link

jianwu1 commented May 25, 2024

Hi I've been trying to install celloracle on a macOS osx-64 conda environment but kept failing due to failing to build gimmemotifs:

set build/lib.macosx-12-arm64-cpython-311/gimmemotifs/_version.py to '0.17.2'
      running build_ext
      building 'gimmemotifs.c_metrics' extension
      creating build/temp.macosx-12-arm64-cpython-311
      creating build/temp.macosx-12-arm64-cpython-311/gimmemotifs
      /Users/jianwu/homebrew/opt/gcc/bin/gcc-14 -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/Users/jianwu/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c gimmemotifs/c_metrics.c -o build/temp.macosx-12-arm64-cpython-311/gimmemotifs/c_metrics.o
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/Availability.h:136,
                       from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/stdlib.h:61,
                       from /Users/jianwu/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/include/python3.11/Python.h:23,
                       from gimmemotifs/c_metrics.c:12:
      /Users/jianwu/homebrew/Cellar/gcc/14.1.0/lib/gcc/current/gcc/aarch64-apple-darwin23/14/include-fixed/AvailabilityInternal.h:185:10: fatal error: AvailabilityInternalLegacy.h: No such file or directory
        185 | #include <AvailabilityInternalLegacy.h>
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/Users/jianwu/homebrew/opt/gcc/bin/gcc-14' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gimmemotifs
  Running setup.py clean for gimmemotifs
Failed to build gimmemotifs
ERROR: Could not build wheels for gimmemotifs, which is required to install pyproject.toml-based projects

But I have gimmemotifs installed by running mamba install gimmemotifs and you can see it's working:

(celloracle) jianwu@mac2876 ~ % gimme --version
GimmeMotifs v0.18.0

It seems celloracle during building is not detecting gimmemotifs but tries to build it again and fails. How can I fix this issue?

@ronghai-li
Copy link

I had a similar issue, but I managed to get CellOracle installed by modifying the compiler.

To be more precise, I removed the original gimmemotifs via pip uninstall gimmemotifs

It's possible that gfortran (a compiler for the Fortran language) is being used as a C compiler because it's more fault-tolerant for certain code or has better support for certain extensions. Even though it's not a compiler for C/C++ code, it might be able to handle code that standard C/C++ compilers can't handle correctly.

CC=/usr/local/bin/gfortran pip install gimmemotifs
CC=/usr/local/bin/gfortran pip install celloracle

finally,Celloracle is installed.

(For_sc) lironghai@lironghaideMacBook-Pro ~ % pip show celloracle                               
Name: celloracle
Version: 0.18.0
Summary: in silico gene perturbation analysis and GRN analysis with single cell data
Home-page: https://github.com/morris-lab/CellOracle
Author: Kenji Kamimoto
Author-email: [email protected]
License: Apache License Version 2.0
Location: /Users/lironghai/anaconda3/envs/For_sc/lib/python3.10/site-packages
Requires: anndata, cython, genomepy, gimmemotifs, goatools, h5py, igraph, joblib, jupyter, louvain, matplotlib, numba, numpy, pandas, pyarrow, scanpy, scikit-learn, scipy, seaborn, tqdm, umap-learn, velocyto
Required-by: 

This is the same method used for Velocyto to install.
CC=/usr/local/bin/gfortran pip install velocyto

operating system
Darwin lironghaideMacBook-Pro.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:19:05 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8112 arm64
Python 3.10.8
numpy 2.0.0
pysam 0.22.1
Cython 3.0.10

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