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

installation #43

Open
colin986 opened this issue Nov 17, 2023 · 8 comments
Open

installation #43

colin986 opened this issue Nov 17, 2023 · 8 comments
Labels

Comments

@colin986
Copy link

colin986 commented Nov 17, 2023

Hi,

I'm attempting to install ANN-SoLo in a new conda environment. When I run pip install, I get the following error

Building wheels for collected packages: ann-solo
  Building wheel for ann-solo (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.9
      creating build/lib.linux-x86_64-3.9/ann_solo
      copying ann_solo/plot_ssm.py -> build/lib.linux-x86_64-3.9/ann_solo
      copying ann_solo/spectrum.py -> build/lib.linux-x86_64-3.9/ann_solo
      copying ann_solo/reader.py -> build/lib.linux-x86_64-3.9/ann_solo
      copying ann_solo/utils.py -> build/lib.linux-x86_64-3.9/ann_solo
      copying ann_solo/__init__.py -> build/lib.linux-x86_64-3.9/ann_solo
      copying ann_solo/config.py -> build/lib.linux-x86_64-3.9/ann_solo
      copying ann_solo/writer.py -> build/lib.linux-x86_64-3.9/ann_solo
      copying ann_solo/spectral_library.py -> build/lib.linux-x86_64-3.9/ann_solo
      copying ann_solo/ann_solo.py -> build/lib.linux-x86_64-3.9/ann_solo
      running build_ext
      Compiling ann_solo/spectrum_match.pyx because it changed.
      [1/1] Cythonizing ann_solo/spectrum_match.pyx
      warning: ann_solo/spectrum_match.pyx:17:58: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'no             except' will be disallowed in a future version of Cython.
      warning: ann_solo/spectrum_match.pyx:23:40: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'no             except' will be disallowed in a future version of Cython.
      building 'ann_solo.spectrum_match' extension
      creating build/temp.linux-x86_64-3.9
      creating build/temp.linux-x86_64-3.9/ann_solo
      gcc -pthread -B /home/colin/miniconda3/envs/ann_solo_39/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /h             ome/colin/miniconda3/envs/ann_solo_39/include -fPIC -O2 -isystem /home/colin/miniconda3/envs/ann_solo_39/include -fPIC -I/home/colin/miniconda3/envs/ann_solo_39             /lib/python3.9/site-packages/numpy/core/include -I/home/colin/miniconda3/envs/ann_solo_39/include/python3.9 -c SpectrumMatch.cpp -o build/temp.linux-x86_64-3.9/             SpectrumMatch.o -O3 -march=native -ffast-math -fno-associative-math -std=c++14
      gcc: error: SpectrumMatch.cpp: No such file or directory
      gcc: fatal error: no input files
      compilation terminated.
      error: command '/usr/bin/gcc' 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 ann-solo
  Running setup.py clean for ann-solo
Failed to build ann-solo
ERROR: Could not build wheels for ann-solo, which is required to install pyproject.toml-based projects

Any help appreciated,
Colin

@bittremieux
Copy link
Owner

Hi Colin, apologies for such a long delay before getting back to you.

Which operating system are you using (I assume Linux from the log, but just to make sure)? What is your gcc version (output of gcc --version)?

Please make sure to follow the installation instructions as detailed in the wiki. We're working on making this a one-step and multi-OS installation procedure, but for now, it still involves a few different steps.

@sarahbeenie
Copy link

Hi there,

I seem to be running into a similar problem -

  dist.fetch_build_eggs(dist.setup_requires)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-11.1-arm64-cpython-39
  creating build/lib.macosx-11.1-arm64-cpython-39/ann_solo
  copying ann_solo/config.py -> build/lib.macosx-11.1-arm64-cpython-39/ann_solo
  copying ann_solo/__init__.py -> build/lib.macosx-11.1-arm64-cpython-39/ann_solo
  copying ann_solo/ann_solo.py -> build/lib.macosx-11.1-arm64-cpython-39/ann_solo
  copying ann_solo/reader.py -> build/lib.macosx-11.1-arm64-cpython-39/ann_solo
  copying ann_solo/spectrum.py -> build/lib.macosx-11.1-arm64-cpython-39/ann_solo
  copying ann_solo/spectral_library.py -> build/lib.macosx-11.1-arm64-cpython-39/ann_solo
  copying ann_solo/utils.py -> build/lib.macosx-11.1-arm64-cpython-39/ann_solo
  copying ann_solo/plot_ssm.py -> build/lib.macosx-11.1-arm64-cpython-39/ann_solo
  copying ann_solo/writer.py -> build/lib.macosx-11.1-arm64-cpython-39/ann_solo
  running build_ext
  Compiling ann_solo/spectrum_match.pyx because it changed.
  [1/1] Cythonizing ann_solo/spectrum_match.pyx
  warning: ann_solo/spectrum_match.pyx:17:58: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: ann_solo/spectrum_match.pyx:23:40: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  building 'ann_solo.spectrum_match' extension
  creating build/temp.macosx-11.1-arm64-cpython-39
  creating build/temp.macosx-11.1-arm64-cpython-39/ann_solo
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/sarah/anaconda3/envs/ann_solo/include -arch arm64 -I/Users/sarah/anaconda3/envs/ann_solo/include -fPIC -O2 -isystem /Users/sarah/anaconda3/envs/ann_solo/include -arch arm64 -I/Users/sarah/anaconda3/envs/ann_solo/lib/python3.9/site-packages/numpy/core/include -I/Users/sarah/anaconda3/envs/ann_solo/include/python3.9 -c SpectrumMatch.cpp -o build/temp.macosx-11.1-arm64-cpython-39/SpectrumMatch.o -O3 -march=native -ffast-math -fno-associative-math -std=c++14
  clang: error: no such file or directory: 'SpectrumMatch.cpp'
  clang: error: no input files
  error: command '/usr/bin/clang' 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 ann_solo
  Running setup.py clean for ann_solo
  Failed to build ann_solo
  ERROR: Could not build wheels for ann_solo, which is required to install pyproject.toml-based projects

@wfondrie
Copy link
Collaborator

Hi @sarahbeenie - it looks like you're on MacOS. Is that right? If so, you'll need to make sure that the Xcode Command LIne Tools are installed. From your terminal, run:

xcode-select --install

After it installs, try installing ANN-SoLo again in a fresh session. Thanks!

@sarahbeenie
Copy link

Hi Will, thanks for your quick response!

Yes, I'm on MacOS. I tried your suggestion but it looks like I already had Xcode Command Line Tools installed. In a fresh session, I got the same error as above.

Any more help would be really appreciated.

Thanks,
Sarah

@bittremieux
Copy link
Owner

IIRC macOS uses Clang instead of GCC as a compiler, right? Can you check which one you have and which version it is?

@sarahbeenie
Copy link

Thanks for the help!

I have this one here - Apple clang version 15.0.0 (clang-1500.1.0.2.5)

@kcygan
Copy link

kcygan commented Apr 25, 2024

Hello everyone!

I encountered the same issue and I could only resolve it by installing python 3.7. Python 3.8 and 3.9 was giving me the same error as mentioned byt the OP.

Hope this helps!

Kamil

@bittremieux
Copy link
Owner

Thanks for the top Kamil. We'll have to do some additional tests on those later Python versions and improve the installation so that it works for all versions and platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants