Open maxbest opened 6 years ago
Maybe you should try things in this article. https://stackoverflow.com/questions/41078572/python-pip-package-installation-fails-with-fatal-error-limits-h-no-such-fil
Anybody was able to install it on RHEL5? I am getting the same errors as @maxbest
@mlazarew can you find the limits.h header on your computer?
Yes, it is at /usr/include/linux/limits.h
Can you try to add /usr/include/linux/ to your PATH
If this did not work, try cloning the repository, add the path to
include_dirs on line 29 https://github.com/ntucllab/libact/blob/master/setup.py#L29.
Run python setup.py install
and see if it works.
Have tried both and still got
cc1: error: unrecognized command line option "-std=c11"
It seems that for my gcc 4.4.6 compiler the value c11 is not a valid one for "std" parameter.
Can you print out the error?
Though I think the fastest way is to upgrade your compiler to 4.8+
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/libact
creating build/temp.linux-x86_64-3.6/libact/query_strategies
creating build/temp.linux-x86_64-3.6/libact/query_strategies/src
creating build/temp.linux-x86_64-3.6/libact/query_strategies/src/variance_reduction
compile options: '-I/home/ec2-user/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/usr/include/lapacke -I/home/ec2-user/anaconda3/include/python3.6m -c'
extra options: '-std=c11'
gcc: libact/query_strategies/src/variance_reduction/variance_reduction.c
libact/query_strategies/src/variance_reduction/variance_reduction.c:5:21: fatal error: lapacke.h: No such file or directory
#include <lapacke.h>
^
compilation terminated.
libact/query_strategies/src/variance_reduction/variance_reduction.c:5:21: fatal error: lapacke.h: No such file or directory
#include <lapacke.h>
^
compilation terminated.
error: Command "gcc -pthread -B /home/ec2-user/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/ec2-user/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/usr/include/lapacke -I/home/ec2-user/anaconda3/include/python3.6m -c libact/query_strategies/src/variance_reduction/variance_reduction.c -o build/temp.linux-x86_64-3.6/libact/query_strategies/src/variance_reduction/variance_reduction.o -std=c11" failed with exit status 1
----------------------------------------
Command "/home/ec2-user/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-lh5sw7ey/libact/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-ufp_l303-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-lh5sw7ey/libact/
$ gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
you may have to install lapacke package
I think you can try searching openblas or lapacke in your package list and see if it works.
there is something error when I install libact on mint Linux 18. What should I do?
(libact) guan@guan-virtual-machine ~/libact-master $ python setup.py build Platform Detection: Linux. Link to liblapacke... running build running build_py running build_ext building 'libact.query_strategies._variance_reduction' extension C compiler: gcc -pthread -B /home/guan/anaconda3/envs/libact/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-I/home/guan/anaconda3/envs/libact/lib/python3.6/site-packages/numpy/core/include -I/usr/include/lapacke -I/home/guan/anaconda3/envs/libact/include/python3.6m -c' extra options: '-std=c11' gcc: libact/query_strategies/src/variance_reduction/variance_reduction.c In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:7:0, from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:34, from /home/guan/anaconda3/envs/libact/include/python3.6m/Python.h:11, from libact/query_strategies/src/variance_reduction/variance_reduction.c:3: /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory compilation terminated. In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/syslimits.h:7:0, from /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:34, from /home/guan/anaconda3/envs/libact/include/python3.6m/Python.h:11, from libact/query_strategies/src/variance_reduction/variance_reduction.c:3: /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory compilation terminated. error: Command "gcc -pthread -B /home/guan/anaconda3/envs/libact/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/guan/anaconda3/envs/libact/lib/python3.6/site-packages/numpy/core/include -I/usr/include/lapacke -I/home/guan/anaconda3/envs/libact/include/python3.6m -c libact/query_strategies/src/variance_reduction/variance_reduction.c -o build/temp.linux-x86_64-3.6/libact/query_strategies/src/variance_reduction/variance_reduction.o -std=c11" failed with exit status 1