Closed RicardoJMPaiva closed 4 years ago
Have you install openblas?
brew install openblas
Yes, i've followed every step in the tutorial, including installing the openblas. But when i try to run the installation command, the error presented above persists. I've tried installing throughout github but the message is the same. Hope that you can help me with this one! Thanks
Do you intend to use variance reduction or hintsvm? if not, set the installation options to not install them should fix the issue. https://github.com/ntucllab/libact#installation-options
If you want to install them, try adding the directory of lapacke.h
to your PATH environment variable
It worked. Thanks
I'm trying to install libact on my computer using the following tutorial: https://pypi.org/project/libact/ I'm using python version 2.7.17 because i've tried using a newer version of python 3 but this one produces other issues. When i type the command to install libact ("pip install --user libact") (after installing all dependencies) i have an issue related to "lapacke.h" file. I've already tried to copy this file and the "lapacke_config.h" file to the libact directory but the error persists. The full error message is presented below. Thanks for the help.
`Collecting libact Using cached https://files.pythonhosted.org/packages/4b/8c/1f57cbe9e6b647afa14f8446c20caa2343fa26153be179e5a89060cd6ec2/libact-0.1.6.tar.gz Requirement already satisfied: setuptools in /usr/local/lib/python2.7/site-packages (from libact) (41.4.0) Requirement already satisfied: numpy in /usr/local/lib/python2.7/site-packages (from libact) (1.16.5) Requirement already satisfied: scipy in /usr/local/lib/python2.7/site-packages (from libact) (1.2.2) Requirement already satisfied: scikit-learn<=0.19.2 in /usr/local/lib/python2.7/site-packages (from libact) (0.19.2) Requirement already satisfied: matplotlib in /usr/local/lib/python2.7/site-packages (from libact) (2.2.4) Requirement already satisfied: Cython in /usr/local/lib/python2.7/site-packages (from libact) (0.29.14) Requirement already satisfied: joblib in /usr/local/lib/python2.7/site-packages (from libact) (0.14.0) Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python2.7/site-packages (from matplotlib->libact) (2.8.1) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python2.7/site-packages (from matplotlib->libact) (2.4.3) Requirement already satisfied: pytz in /usr/local/lib/python2.7/site-packages (from matplotlib->libact) (2019.3) Requirement already satisfied: backports.functools-lru-cache in /usr/local/lib/python2.7/site-packages (from matplotlib->libact) (1.6.1) Requirement already satisfied: six>=1.10 in /usr/local/lib/python2.7/site-packages (from matplotlib->libact) (1.12.0) Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python2.7/site-packages (from matplotlib->libact) (0.10.0) Requirement already satisfied: subprocess32 in /usr/local/lib/python2.7/site-packages (from matplotlib->libact) (3.5.4) Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python2.7/site-packages (from matplotlib->libact) (1.1.0) Building wheels for collected packages: libact Building wheel for libact (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/local/opt/python@2/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-install-4FxfDB/libact/setup.py'"'"'; file='"'"'/private/var/folders/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-install-4FxfDB/libact/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/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-wheel-YCK8Iv --python-tag cp27 cwd: /private/var/folders/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-install-4FxfDB/libact/ Complete output (73 lines): Platform Detection: Mac OS X. Link to openblas... Build VarianceReduction... Build HintSVM... running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.15-x86_64-2.7 creating build/lib.macosx-10.15-x86_64-2.7/libact copying libact/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact creating build/lib.macosx-10.15-x86_64-2.7/libact/base copying libact/base/interfaces.py -> build/lib.macosx-10.15-x86_64-2.7/libact/base copying libact/base/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/base copying libact/base/dataset.py -> build/lib.macosx-10.15-x86_64-2.7/libact/base creating build/lib.macosx-10.15-x86_64-2.7/libact/models copying libact/models/perceptron.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models copying libact/models/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models copying libact/models/sklearn_adapter.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models copying libact/models/logistic_regression.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models copying libact/models/svm.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models creating build/lib.macosx-10.15-x86_64-2.7/libact/models/multilabel copying libact/models/multilabel/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models/multilabel copying libact/models/multilabel/binary_relevance.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models/multilabel copying libact/models/multilabel/dummy_clf.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models/multilabel creating build/lib.macosx-10.15-x86_64-2.7/libact/labelers copying libact/labelers/ideal_labeler.py -> build/lib.macosx-10.15-x86_64-2.7/libact/labelers copying libact/labelers/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/labelers copying libact/labelers/interactive_labeler.py -> build/lib.macosx-10.15-x86_64-2.7/libact/labelers creating build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/random_sampling.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/hintsvm.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/quire.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/active_learning_by_learning.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/variance_reduction.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/query_by_committee.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/density_weighted_meta.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/density_weighted_uncertainty_sampling.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/uncertainty_sampling.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies creating build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/cost_sensitive_reference_pair_encoding.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/maximum_margin_reduction.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/binary_minimization.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/multilabel_with_auxiliary_learner.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/adaptive_active_learning.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel creating build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass copying libact/query_strategies/multiclass/expected_error_reduction.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass copying libact/query_strategies/multiclass/mdsp.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass copying libact/query_strategies/multiclass/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass copying libact/query_strategies/multiclass/active_learning_with_cost_embedding.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass copying libact/query_strategies/multiclass/hierarchical_sampling.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass creating build/lib.macosx-10.15-x86_64-2.7/libact/utils copying libact/utils/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/utils running build_ext building 'libact.query_strategies._variance_reduction' extension Warning: Can't read registry to find the necessary compiler setting Make sure that Python modules _winreg, win32api or win32con are installed. C compiler: clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
creating build/temp.macosx-10.15-x86_64-2.7 creating build/temp.macosx-10.15-x86_64-2.7/libact creating build/temp.macosx-10.15-x86_64-2.7/libact/query_strategies creating build/temp.macosx-10.15-x86_64-2.7/libact/query_strategies/src creating build/temp.macosx-10.15-x86_64-2.7/libact/query_strategies/src/variance_reduction compile options: '-I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/opt/local/include -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c' extra options: '-std=c11' clang: libact/query_strategies/src/variance_reduction/variance_reduction.c libact/query_strategies/src/variance_reduction/variance_reduction.c:5:10: fatal error: 'lapacke.h' file not found
include
1 error generated. error: Command "clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/opt/local/include -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c libact/query_strategies/src/variance_reduction/variance_reduction.c -o build/temp.macosx-10.15-x86_64-2.7/libact/query_strategies/src/variance_reduction/variance_reduction.o -std=c11" failed with exit status 1
ERROR: Failed building wheel for libact Running setup.py clean for libact Failed to build libact Installing collected packages: libact Running setup.py install for libact ... error ERROR: Command errored out with exit status 1: command: /usr/local/opt/python@2/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-install-4FxfDB/libact/setup.py'"'"'; file='"'"'/private/var/folders/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-install-4FxfDB/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 /private/var/folders/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-record-rKZUWh/install-record.txt --single-version-externally-managed --compile --user --prefix= cwd: /private/var/folders/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-install-4FxfDB/libact/ Complete output (73 lines): Platform Detection: Mac OS X. Link to openblas... Build VarianceReduction... Build HintSVM... running install running build running build_py creating build creating build/lib.macosx-10.15-x86_64-2.7 creating build/lib.macosx-10.15-x86_64-2.7/libact copying libact/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact creating build/lib.macosx-10.15-x86_64-2.7/libact/base copying libact/base/interfaces.py -> build/lib.macosx-10.15-x86_64-2.7/libact/base copying libact/base/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/base copying libact/base/dataset.py -> build/lib.macosx-10.15-x86_64-2.7/libact/base creating build/lib.macosx-10.15-x86_64-2.7/libact/models copying libact/models/perceptron.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models copying libact/models/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models copying libact/models/sklearn_adapter.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models copying libact/models/logistic_regression.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models copying libact/models/svm.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models creating build/lib.macosx-10.15-x86_64-2.7/libact/models/multilabel copying libact/models/multilabel/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models/multilabel copying libact/models/multilabel/binary_relevance.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models/multilabel copying libact/models/multilabel/dummy_clf.py -> build/lib.macosx-10.15-x86_64-2.7/libact/models/multilabel creating build/lib.macosx-10.15-x86_64-2.7/libact/labelers copying libact/labelers/ideal_labeler.py -> build/lib.macosx-10.15-x86_64-2.7/libact/labelers copying libact/labelers/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/labelers copying libact/labelers/interactive_labeler.py -> build/lib.macosx-10.15-x86_64-2.7/libact/labelers creating build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/random_sampling.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/hintsvm.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/quire.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/active_learning_by_learning.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/variance_reduction.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/query_by_committee.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/density_weighted_meta.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/density_weighted_uncertainty_sampling.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies copying libact/query_strategies/uncertainty_sampling.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies creating build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/cost_sensitive_reference_pair_encoding.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/maximum_margin_reduction.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/binary_minimization.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/multilabel_with_auxiliary_learner.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel copying libact/query_strategies/multilabel/adaptive_active_learning.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multilabel creating build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass copying libact/query_strategies/multiclass/expected_error_reduction.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass copying libact/query_strategies/multiclass/mdsp.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass copying libact/query_strategies/multiclass/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass copying libact/query_strategies/multiclass/active_learning_with_cost_embedding.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass copying libact/query_strategies/multiclass/hierarchical_sampling.py -> build/lib.macosx-10.15-x86_64-2.7/libact/query_strategies/multiclass creating build/lib.macosx-10.15-x86_64-2.7/libact/utils copying libact/utils/init.py -> build/lib.macosx-10.15-x86_64-2.7/libact/utils running build_ext building 'libact.query_strategies._variance_reduction' extension Warning: Can't read registry to find the necessary compiler setting Make sure that Python modules _winreg, win32api or win32con are installed. C compiler: clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
ERROR: Command errored out with exit status 1: /usr/local/opt/python@2/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-install-4FxfDB/libact/setup.py'"'"'; file='"'"'/private/var/folders/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-install-4FxfDB/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 /private/var/folders/53/ksln0nrd5pqd2y7dtxzmlx680000gn/T/pip-record-rKZUWh/install-record.txt --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.`