velocyto.py
velocyto.py copied to clipboard
Failed to install velocyto.py
I have been trying to install velocity.py according to instruction using the code below but I have been unsuccessful. I use Mac Catalina 10.15 , python3 anaconda 3
The code I used : pip install velocyto
the error I got
Building wheels for collected packages: velocyto Building wheel for velocyto (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/samarelorbany/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-install-wbsqcof4/velocyto/setup.py'"'"'; file='"'"'/private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-install-wbsqcof4/velocyto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-wheel-8huar8aw cwd: /private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-install-wbsqcof4/velocyto/ Complete output (43 lines): ['/private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-install-wbsqcof4/velocyto/setup.py', 'bdist_wheel', '-d', '/private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-wheel-8huar8aw'] running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.7 creating build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/transcript_model.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/diffusion.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/metadata.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/analysis.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/molitem.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/_version.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/neighbors.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/constants.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/estimation.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/init.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/feature.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/logic.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/indexes.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/utils.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/gene_info.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/r_interface.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/segment_match.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/counter.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/serialization.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/read.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto creating build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/velocyto.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/run.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/init.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/run_smartseq2.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/dropest_bc_correct.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/run_dropest.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/run10x.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/_run.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands running build_ext building 'velocyto.speedboosted' extension creating build/temp.macosx-10.9-x86_64-3.7 creating build/temp.macosx-10.9-x86_64-3.7/velocyto gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/samarelorbany/anaconda3/include -arch x86_64 -I/Users/samarelorbany/anaconda3/include -arch x86_64 -I/Users/samarelorbany/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/samarelorbany/anaconda3/include/python3.7m -c velocyto/speedboosted.c -o build/temp.macosx-10.9-x86_64-3.7/velocyto/speedboosted.o -fopenmp -ffast-math clang: error: unsupported option '-fopenmp' error: command 'gcc' failed with exit status 1
ERROR: Failed building wheel for velocyto Running setup.py clean for velocyto Failed to build velocyto Installing collected packages: velocyto Running setup.py install for velocyto ... error ERROR: Command errored out with exit status 1: command: /Users/samarelorbany/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-install-wbsqcof4/velocyto/setup.py'"'"'; file='"'"'/private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-install-wbsqcof4/velocyto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-record-zzmqsyl_/install-record.txt --single-version-externally-managed --compile --install-headers /Users/samarelorbany/anaconda3/include/python3.7m/velocyto cwd: /private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-install-wbsqcof4/velocyto/ Complete output (43 lines): ['/private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-install-wbsqcof4/velocyto/setup.py', 'install', '--record', '/private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-record-zzmqsyl_/install-record.txt', '--single-version-externally-managed', '--compile', '--install-headers', '/Users/samarelorbany/anaconda3/include/python3.7m/velocyto'] running install running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.7 creating build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/transcript_model.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/diffusion.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/metadata.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/analysis.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/molitem.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/_version.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/neighbors.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/constants.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/estimation.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/init.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/feature.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/logic.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/indexes.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/utils.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/gene_info.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/r_interface.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/segment_match.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/counter.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/serialization.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto copying velocyto/read.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto creating build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/velocyto.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/run.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/init.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/run_smartseq2.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/dropest_bc_correct.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/run_dropest.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/run10x.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands copying velocyto/commands/run.py -> build/lib.macosx-10.9-x86_64-3.7/velocyto/commands running build_ext building 'velocyto.speedboosted' extension creating build/temp.macosx-10.9-x86_64-3.7 creating build/temp.macosx-10.9-x86_64-3.7/velocyto gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/samarelorbany/anaconda3/include -arch x86_64 -I/Users/samarelorbany/anaconda3/include -arch x86_64 -I/Users/samarelorbany/anaconda3/lib/python3.7/site-packages/numpy/core/include -I/Users/samarelorbany/anaconda3/include/python3.7m -c velocyto/speedboosted.c -o build/temp.macosx-10.9-x86_64-3.7/velocyto/speedboosted.o -fopenmp -ffast-math clang: error: unsupported option '-fopenmp' error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/samarelorbany/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-install-wbsqcof4/velocyto/setup.py'"'"'; file='"'"'/private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-install-wbsqcof4/velocyto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/40/r15m2x5n3vj1vd599d25fp4h0000gn/T/pip-record-zzmqsyl/install-record.txt --single-version-externally-managed --compile --install-headers /Users/samarelorbany/anaconda3/include/python3.7m/velocyto Check the logs for full command output.
**### I am using Mac Catalina 10.15 R version 4.0.0 , Python3 anaconda 3
I tried all the advise given on that issue in #53 but didn't work**
Conda install gcc ... gives that error: ollecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- gcc
Current channels:
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
However: gcc --version returns that it is installed Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 11.0.3 (clang-1103.0.32.62) Target: x86_64-apple-darwin19.5.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
also conda install libgcc : confirms that it is installed
could you please help ?
Hi,
Sorry to chase you. Is anyone able to help with the above query please?
thanks Samar
I think I found the solution. I've have been doing some research and have found that Mac computer use Apple's compiler Clang by default. As a result, clang is used as the compiler even when you installed the compiler gcc. This is important because clang does not support openMP while gcc does and openMP is needed to install velocyto. Thus, in order to have pip use gcc instead of clang you can do the following.
- Find out what your version and directory are for gcc.
gcc --version
which gcc
- Run the following command:
CC=PATH/TO/gcc-VERSION pip install velocyto
I hope this helps. :)
I think I found the solution. I've have been doing some research and have found that Mac computer use Apple's compiler Clang by default. As a result, clang is used as the compiler even when you installed the compiler gcc. This is important because clang does not support openMP while gcc does and openMP is needed to install velocyto. Thus, in order to have pip use gcc instead of clang you can do the following.
- Find out what your version and directory are for gcc.
gcc --version
which gcc
- Run the following command:
CC=PATH/TO/gcc-VERSION pip install velocyto
I hope this helps. :)
This worked for me:
- Install gcc with homebrew
- It ended up in
/usr/local/bin/
, namely/usr/local/bin/gcc-10
. Not to confuse with/usr/bin/gcc
! - Run
CC=/usr/local/bin/gcc-10 pip install velocyto
@f6v Thank you, step3 could finally help me to escape the gcc incompatibility issue!
EDIT: resolved after I found out gcc was installed as g++-10 by brew in /usr/local/bin/g++-10
. Hence using CC=/usr/local/bin/g++-10 pip install velocyto
I was able to install velocyto.
Original Q:
I'm having the same issue and unfortunately the proposed solutions did not work for me. Specifying the C compiler using CC=/usr/bin/gcc pip install velocyto
still gave error message for gcc:
ERROR: Command errored out with exit status 1: command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8z/k5cyvf4j5kl0mzc9vn1gf_2h0000gq/T/pip-install-9392gio6/velocyto_06485e1e1ab042f7986b92aaedaef12c/setup.py'"'"'; __file__='"'"'/private/var/folders/8z/k5cyvf4j5kl0mzc9vn1gf_2h0000gq/T/pip-install-9392gio6/velocyto_06485e1e1ab042f7986b92aaedaef12c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/8z/k5cyvf4j5kl0mzc9vn1gf_2h0000gq/T/pip-wheel-pldmi5ph cwd: /private/var/folders/8z/k5cyvf4j5kl0mzc9vn1gf_2h0000gq/T/pip-install-9392gio6/velocyto_06485e1e1ab042f7986b92aaedaef12c/
(...)
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c velocyto/speedboosted.c -o build/temp.macosx-10.9-x86_64-3.8/velocyto/speedboosted.o -fopenmp -ffast-math clang: error: unsupported option '-fopenmp' error: command 'gcc' failed with exit status 1
I then followed @fv6's suggestion to install gcc using brew. It was installed in /usr/local/Cellar/gcc
, but unfortunately there is a permission problem when I tried running CC=/usr/local/Cellar/gcc pip install velocyto
:
/usr/local/Cellar/gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c velocyto/speedboosted.c -o build/temp.macosx-10.9-x86_64-3.8/velocyto/speedboosted.o -fopenmp -ffast-math unable to execute '/usr/local/Cellar/gcc': Permission denied error: command '/usr/local/Cellar/gcc' failed with exit status 1
I tried fixing this using the suggestions in https://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions, namely through sudo chown -R $(whoami) $(brew --prefix)/*
, which exited without error, but the installation still gives the same error.
Hi, I tried step3 of gcc, it didn't fix the problem, I still can't install velocyto successfully. Does anyone have any other ideas? Thanks in advance! Yi
The following suggestions in this post worked for me. This is what I did: 1- As @f6v suggested - Installed gcc with homebrew 2- CC=/usr/local/bin/g++-10 pip install velocyto (according to @YitengDang 's post)
Just want to add another information:
The above gcc thing doesn't work for me but I used "gfortran" instead of gcc and it worked
The command line I used: CC=/usr/local/bin/gfortran pip install velocyto
@f6v Thank you! Your Step3 helped me solve the installation issue!
Saved my day! This is the one that works for me after trying for hours. Thanks! --CC=/usr/local/bin/gfortran pip install velocyto
Thanks! Just to add another possible location to look:
My brew gcc ended up in /opt/homebrew/Cellar/gcc/11.2.0_3/bin/gcc-11
This command worked for me (Mac OSX BigSur M1)
CC=/opt/homebrew/Cellar/gcc/11.2.0_3/bin/gcc-11 pip install velocyto
Thanks! Just to add another possible location to look: My brew gcc ended up in
/opt/homebrew/Cellar/gcc/11.2.0_3/bin/gcc-11
This command worked for me (Mac OSX BigSur M1)
CC=/opt/homebrew/Cellar/gcc/11.2.0_3/bin/gcc-11 pip install velocyto
This worked for me, with the added modification of export CC=/opt/homebrew/Cellar/gcc/13.2.0/bin/gcc-13
(note the added export
)
Thank you so much!! @theimagelab You saved my day! It worked for me by adding this cmd bcs I only found gcc when I checked cd /usr/bin ls:
export CC=/opt/homebrew/Cellar/gcc/13.2.0/bin/gcc-13
Then
CC=/opt/homebrew/Cellar/gcc/13.2.0/bin/gcc-13 pip install velocyto