motiwari / BanditPAM

BanditPAM C++ implementation and Python package
MIT License
647 stars 38 forks source link

Error during installation #151

Closed jordypalafox closed 2 years ago

jordypalafox commented 2 years ago

Hello, I have some trouble during the installation, i've done manually the installation of the most of the packages required but when i try to launch

python3 setup.py install 

we get this long error message :

  ERROR: Command errored out with exit status 1:
   command: /home/my_name/anaconda3/envs/banditpam/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v0qkwnjc/banditpam_d9cd8fd56bfa4fa18e0c13576ff6884e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-v0qkwnjc/banditpam_d9cd8fd56bfa4fa18e0c13576ff6884e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7situpf8
       cwd: /tmp/pip-install-v0qkwnjc/banditpam_d9cd8fd56bfa4fa18e0c13576ff6884e/
  Complete output (29 lines):
  /tmp/pip-install-v0qkwnjc/banditpam_d9cd8fd56bfa4fa18e0c13576ff6884e/setup.py:220: SyntaxWarning: assertion is always true, perhaps remove parentheses?
    assert(compiler_check() == 'clang', "Need to install LLVM clang!")
  /tmp/pip-install-v0qkwnjc/banditpam_d9cd8fd56bfa4fa18e0c13576ff6884e/setup.py:246: SyntaxWarning: assertion is always true, perhaps remove parentheses?
    assert(compiler_name == 'clang', "Need to install LLVM clang!")
  running bdist_wheel
  running build
  running build_ext
  creating tmp
  gcc -pthread -B /home/my_name/anaconda3/envs/banditpam/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/my_name/anaconda3/envs/banditpam/include/python3.8 -c /tmp/tmpz0v0uxd7.cpp -o tmp/tmpz0v0uxd7.o -std=c++1y
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  gcc -pthread -B /home/my_name/anaconda3/envs/banditpam/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/my_name/anaconda3/envs/banditpam/include/python3.8 -c /tmp/tmp19l8dty8.cpp -o tmp/tmp19l8dty8.o -fvisibility=hidden
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  building 'banditpam' extension
  creating build
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/src
  gcc -pthread -B /home/my_name/anaconda3/envs/banditpam/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DVERSION_INFO="1.0.0" -I/home/my_name/anaconda3/envs/banditpam/lib/python3.8/site-packages/pybind11/include -I/home/my_name/anaconda3/envs/banditpam/lib/python3.8/site-packages/numpy/core/include -Iheaders -Iheaders/carma/include/carma_bits -Iheaders/carma/include -I/usr/local/include -I/home/my_name/anaconda3/envs/banditpam/include/python3.8 -c src/kmedoids_pywrapper.cpp -o build/temp.linux-x86_64-3.8/src/kmedoids_pywrapper.o -O3 -Wno-register -std=c++1y -O3 -fopenmp -fvisibility=hidden
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  gcc -pthread -B /home/my_name/anaconda3/envs/banditpam/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DVERSION_INFO="1.0.0" -I/home/my_name/anaconda3/envs/banditpam/lib/python3.8/site-packages/pybind11/include -I/home/my_name/anaconda3/envs/banditpam/lib/python3.8/site-packages/numpy/core/include -Iheaders -Iheaders/carma/include/carma_bits -Iheaders/carma/include -I/usr/local/include -I/home/my_name/anaconda3/envs/banditpam/include/python3.8 -c src/kmedoids_algorithm.cpp -o build/temp.linux-x86_64-3.8/src/kmedoids_algorithm.o -O3 -Wno-register -std=c++1y -O3 -fopenmp -fvisibility=hidden
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  src/kmedoids_algorithm.cpp: In member function ‘arma::rowvec km::KMedoids::build_sigma(const mat&, arma::rowvec&, arma::uword, bool)’:
  src/kmedoids_algorithm.cpp:386:28: error: ‘quantile’ is not a member of ‘arma’
    386 |     arma::rowvec Q = arma::quantile(updated_sigma, P);
        |                            ^~~~~~~~
  src/kmedoids_algorithm.cpp: In member function ‘void km::KMedoids::sigma_log(arma::mat&)’:
  src/kmedoids_algorithm.cpp:518:26: error: ‘quantile’ is not a member of ‘arma’
    518 |   arma::rowvec Q = arma::quantile(flat_sigma, P);
        |                          ^~~~~~~~
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for banditpam

Do you have some hints to help me ? (clang is installed so i do not understand the message 'install llvm clang')

motiwari commented 2 years ago

Hi @jfoxdata, thank you for the bug report!

A few questions:

Environment:

A few points to note:

jordypalafox commented 2 years ago

Hello and thank you for your detailled answer, As you suspected, Armadillo was not wel-installed. That works perfectly right now. Thank for your work and sharing.