mnnpy
mnnpy copied to clipboard
Does not install on macOS
Tried installing this for scanpy, as recommended (pip install mnnpy
), on a macOS High Sierra (v10.13.4) within a Miniconda environment, but it returns an error:
clang: error: unsupported option '-fopenmp'
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for mnnpy
From what I've read online, clang on OSX is different, which may be the problem. Is there a way to install mnnpy on Mac?
I'm having exactly the same issue
clang: error: unsupported option '-fopenmp'
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for mnnpy
Running setup.py clean for mnnpy
Failed to build mnnpy
I was able to install mnnpy with the homebrew version of gcc 8.2 on OSX 10.13.6. Just had to point to the usable gcc.
export CC=/usr/local/Cellar/gcc/8.2.0/bin/gcc-8
pip install mnnpy
I also get
clang: error: unsupported option '-fopenmp'
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for mnnpy
Running setup.py clean for mnnpy
Failed to build mnnpy
The above suggestion re: gcc doesn't work for me
@bjstewart1 I'm using mnn through scanpy (https://scanpy.readthedocs.io/en/latest/api/scanpy.api.pp.mnn_correct.html) - have you tried that option?
@aopisco ideally i'd like to integrate with my R workflow. Scanpy is a bit fiddly in terms of working with reticulate, which is why I thought i'd try mnnpy directly.
@bjstewart1 I see what you mean... may I ask why you don't use the R version from Marioni's lab (in library scater)?
@aopisco I've got a lot of cells! Looking for a fast implementation of mnncorrect and in R it is really very slow. Their fastMNN works fast - my experience is that whilst it works well for bringing together large clusters, it (?the denoising) seems to hinder identification of rare cell types... Anyway, I thought it would be good to experiment with this implementation of mnncorrect, if I could install it!
In fact, what is more, installation of scanpy on my mac did not include mnnpy (or mnn_correct as it is called there) presumably because it cannot be installed because of this issue:
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -Imnnpy -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c mnnpy/_utils.c -o build/temp.macosx-10.6-intel-3.6/mnnpy/_utils.o -O2 -ffast-math -march=native -fopenmp
clang: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Failed building wheel for mnnpy
After much reinstalling, and steps I almost certainly cannot replicate, it now installs. Required installing llvm from brew and lomp from brew....
Glad you guys could work it out. I was actually developing from my mac but didn't encounter the issue. I may have installed all those deps without knowing...
I was able to install mnnpy with the homebrew version of gcc 8.2 on OSX 10.13.6. Just had to point to the usable gcc.
export CC=/usr/local/Cellar/gcc/8.2.0/bin/gcc-8 pip install mnnpy
@cfriedline that worked for me.
The following steps worked on two different macs for me
-
$ brew install gcc --without-multlib
-
$ export CC=/usr/local/Cellar/gcc/8.2.0/bin/gcc-8
-
pip install mnnpy
Another thing to try if you are struggling with this is the following slight adjustment to the above recipe
brew install gcc
export CC=/usr/local/Cellar/gcc/8.3.0/bin/g++-8
pip install mnnpy
(the relevant adjustment is g++ instead of gcc, not the version number ;-) )
This worked for me in an anaconda environment on MacOS Mojave.
Hi,
I tried the solutions you guys mentioned, but I still can not install mnnpy package. What should I do?