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

Failed to install velocyto.py #264

Open
Sa753 opened this issue Jun 2, 2020 · 14 comments
Open

Failed to install velocyto.py #264

Sa753 opened this issue Jun 2, 2020 · 14 comments

Comments

@Sa753
Copy link

Sa753 commented Jun 2, 2020

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:

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 ?

@Sa753
Copy link
Author

Sa753 commented Jun 8, 2020

Hi,

Sorry to chase you. Is anyone able to help with the above query please?

thanks
Samar

@alexanderlewis99
Copy link

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.

  1. Find out what your version and directory are for gcc.
    gcc --version
    which gcc
  2. Run the following command:
    CC=PATH/TO/gcc-VERSION pip install velocyto
    I hope this helps. :)

@f6v
Copy link

f6v commented Nov 5, 2020

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.

  1. Find out what your version and directory are for gcc.
    gcc --version
    which gcc
  2. Run the following command:
    CC=PATH/TO/gcc-VERSION pip install velocyto
    I hope this helps. :)

This worked for me:

  1. Install gcc with homebrew
  2. It ended up in /usr/local/bin/, namely /usr/local/bin/gcc-10. Not to confuse with /usr/bin/gcc!
  3. Run CC=/usr/local/bin/gcc-10 pip install velocyto

@felixradtke
Copy link

@f6v Thank you, step3 could finally help me to escape the gcc incompatibility issue!

@YitengDang

This comment has been minimized.

@gabriellayi
Copy link

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

@hbandukw
Copy link

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)

@454-Casull
Copy link

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

@dkoga4116
Copy link

@f6v Thank you! Your Step3 helped me solve the installation issue!

@songchao1989
Copy link

Saved my day! This is the one that works for me after trying for hours.
Thanks!
--CC=/usr/local/bin/gfortran pip install velocyto

@andrewdchen
Copy link

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

@theimagelab
Copy link

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)

@RileyWang-debug
Copy link

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

@ncedi12
Copy link

ncedi12 commented Dec 30, 2024

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

This finally worked for me too. Thank you so much

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