Closed XueJiaAIMR closed 1 year ago
It appears there are errors building the variance_reduction query_strategy. If you are not using that algorithm, you can go with
LIBACT_BUILD_VARIANCE_REDUCTION =0 pip install git+https://github.com/ntucllab/libact.git
If you need to use this algorithm, the error appears to be
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
building 'libact.query_strategies._variance_reduction' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Maybe try updating your Visual C++ build tools and reinstall your numpy can help
It appears there are errors building the variance_reduction query_strategy. If you are not using that algorithm, you can go with
LIBACT_BUILD_VARIANCE_REDUCTION =0 pip install git+https://github.com/ntucllab/libact.git
If you need to use this algorithm, the error appears to be
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'libact.query_strategies._variance_reduction' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Maybe try updating your Visual C++ build tools and reinstall your numpy can help
I installed the Visual C++ build tools, but the similar error occurred when I use "pip install --user libact" C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -ID:\Anaconda\anzjhuang\envs\py36\lib\site-packages\numpy\core\include -I/usr/include/ -ID:\Anaconda\anzjhuang\envs\py36\include -ID:\Anaconda\anzjhuang\envs\py36\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.6\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11 cl: 命令行 warning D9002 :忽略未知选项“-std=c11” variance_reduction.c libact/query_strategies/src/variance_reduction/variance_reduction.c(5): fatal error C1083: 无法打开包括文件: “lapacke.h”: No such file or directory error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -ID:\Anaconda\anzjhuang\envs\py36\lib\site-packages\numpy\core\include -I/usr/include/ -ID:\Anaconda\anzjhuang\envs\py36\include -ID:\Anaconda\anzjhuang\envs\py36\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.6\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11" failed with exit status 2
----------------------------------------
Command "D:\Anaconda\anzjhuang\envs\py36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HIT\AppData\Local\Temp\pip-build-_6pecdna\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 C:\Users\HIT\AppData\Local\Temp\pip-2faxmsu7-record\install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in C:\Users\HIT\AppData\Local\Temp\pip-build-_6pecdna\libact\
(py36) C:\Users\HIT\libact>cd libact
(py36) C:\Users\HIT\libact\libact>pip install --user libact Collecting libact Using cached https://files.pythonhosted.org/packages/4b/8c/1f57cbe9e6b647afa14f8446c20caa2343fa26153be179e5a89060cd6ec2/libact-0.1.6.tar.gz Requirement already satisfied: setuptools in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: numpy in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: scipy in c:\users\hit\appdata\roaming\python\python36\site-packages (from libact) Requirement already satisfied: scikit-learn<=0.19.2 in c:\users\hit\appdata\roaming\python\python36\site-packages (from libact) Requirement already satisfied: matplotlib in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: Cython in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: joblib in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: kiwisolver>=1.0.1 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from matplotlib->libact) Requirement already satisfied: pillow>=6.2.0 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from matplotlib->libact) Requirement already satisfied: python-dateutil>=2.1 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from matplotlib->libact) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from matplotlib->libact) Requirement already satisfied: cycler>=0.10 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from matplotlib->libact) Requirement already satisfied: six>=1.5 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from python-dateutil>=2.1->matplotlib->libact) Building wheels for collected packages: libact Running setup.py bdist_wheel for libact ... error Complete output from command D:\Anaconda\anzjhuang\envs\py36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HIT\AppData\Local\Temp\pip-build-66nyd6fa\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 C:\Users\HIT\AppData\Local\Temp\tmp979qhsdppip-wheel- --python-tag cp36: Platform Detection: Linux. Link to liblapacke... Build VarianceReduction... Build HintSVM... running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\libact copying libact__init.py -> build\lib.win-amd64-3.6\libact creating build\lib.win-amd64-3.6\libact\base copying libact\base\dataset.py -> build\lib.win-amd64-3.6\libact\base copying libact\base\interfaces.py -> build\lib.win-amd64-3.6\libact\base copying libact\base__init.py -> build\lib.win-amd64-3.6\libact\base creating build\lib.win-amd64-3.6\libact\models copying libact\models\logistic_regression.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\perceptron.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\sklearn_adapter.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\svm.py -> build\lib.win-amd64-3.6\libact\models copying libact\models__init.py -> build\lib.win-amd64-3.6\libact\models creating build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel\binary_relevance.py -> build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel\dummy_clf.py -> build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel__init.py -> build\lib.win-amd64-3.6\libact\models\multilabel creating build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\ideal_labeler.py -> build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\interactive_labeler.py -> build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\init__.py -> build\lib.win-amd64-3.6\libact\labelers creating build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\active_learning_by_learning.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\density_weighted_meta.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\density_weighted_uncertainty_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\hintsvm.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\query_by_committee.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\quire.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\random_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\uncertainty_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\variance_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\init__.py -> build\lib.win-amd64-3.6\libact\query_strategies creating build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\adaptive_active_learning.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\binary_minimization.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\cost_sensitive_reference_pair_encoding.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\maximum_margin_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\multilabel_with_auxiliary_learner.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\init.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel creating build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\active_learning_with_cost_embedding.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\expected_error_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\hierarchical_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\mdsp.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\init__.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass creating build\lib.win-amd64-3.6\libact\utils copying libact\utils\init__.py -> build\lib.win-amd64-3.6\libact\utils running build_ext No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'libact.query_strategies._variance_reduction' extension creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\libact creating build\temp.win-amd64-3.6\Release\libact\query_strategies creating build\temp.win-amd64-3.6\Release\libact\query_strategies\src creating build\temp.win-amd64-3.6\Release\libact\query_strategies\src\variance_reduction C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -ID:\Anaconda\anzjhuang\envs\py36\lib\site-packages\numpy\core\include -I/usr/include/ -ID:\Anaconda\anzjhuang\envs\py36\include -ID:\Anaconda\anzjhuang\envs\py36\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.6\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11 cl: 命令行 warning D9002 :忽略未知选项“-std=c11” variance_reduction.c libact/query_strategies/src/variance_reduction/variance_reduction.c(5): fatal error C1083: 无法打开包括文件: “lapacke.h”: No such file or directory error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -ID:\Anaconda\anzjhuang\envs\py36\lib\site-packages\numpy\core\include -I/usr/include/ -ID:\Anaconda\anzjhuang\envs\py36\include -ID:\Anaconda\anzjhuang\envs\py36\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.6\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11" failed with exit status 2
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 Complete output from command D:\Anaconda\anzjhuang\envs\py36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HIT\AppData\Local\Temp\pip-build-66nyd6fa\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 C:\Users\HIT\AppData\Local\Temp\pip-658sees_-record\install-record.txt --single-version-externally-managed --compile --user --prefix=: Platform Detection: Linux. Link to liblapacke... Build VarianceReduction... Build HintSVM... running install running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\libact copying libact__init.py -> build\lib.win-amd64-3.6\libact creating build\lib.win-amd64-3.6\libact\base copying libact\base\dataset.py -> build\lib.win-amd64-3.6\libact\base copying libact\base\interfaces.py -> build\lib.win-amd64-3.6\libact\base copying libact\base__init.py -> build\lib.win-amd64-3.6\libact\base creating build\lib.win-amd64-3.6\libact\models copying libact\models\logistic_regression.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\perceptron.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\sklearn_adapter.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\svm.py -> build\lib.win-amd64-3.6\libact\models copying libact\models__init.py -> build\lib.win-amd64-3.6\libact\models creating build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel\binary_relevance.py -> build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel\dummy_clf.py -> build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel__init.py -> build\lib.win-amd64-3.6\libact\models\multilabel creating build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\ideal_labeler.py -> build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\interactive_labeler.py -> build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\init__.py -> build\lib.win-amd64-3.6\libact\labelers creating build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\active_learning_by_learning.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\density_weighted_meta.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\density_weighted_uncertainty_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\hintsvm.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\query_by_committee.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\quire.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\random_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\uncertainty_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\variance_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\init__.py -> build\lib.win-amd64-3.6\libact\query_strategies creating build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\adaptive_active_learning.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\binary_minimization.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\cost_sensitive_reference_pair_encoding.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\maximum_margin_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\multilabel_with_auxiliary_learner.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\init.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel creating build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\active_learning_with_cost_embedding.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\expected_error_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\hierarchical_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\mdsp.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\init__.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass creating build\lib.win-amd64-3.6\libact\utils copying libact\utils\init__.py -> build\lib.win-amd64-3.6\libact\utils running build_ext No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'libact.query_strategies._variance_reduction' extension creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\libact creating build\temp.win-amd64-3.6\Release\libact\query_strategies creating build\temp.win-amd64-3.6\Release\libact\query_strategies\src creating build\temp.win-amd64-3.6\Release\libact\query_strategies\src\variance_reduction C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -ID:\Anaconda\anzjhuang\envs\py36\lib\site-packages\numpy\core\include -I/usr/include/ -ID:\Anaconda\anzjhuang\envs\py36\include -ID:\Anaconda\anzjhuang\envs\py36\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.6\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11 cl: 命令行 warning D9002 :忽略未知选项“-std=c11” variance_reduction.c libact/query_strategies/src/variance_reduction/variance_reduction.c(5): fatal error C1083: 无法打开包括文件: “lapacke.h”: No such file or directory error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -ID:\Anaconda\anzjhuang\envs\py36\lib\site-packages\numpy\core\include -I/usr/include/ -ID:\Anaconda\anzjhuang\envs\py36\include -ID:\Anaconda\anzjhuang\envs\py36\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.6\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11" failed with exit status 2
----------------------------------------
Command "D:\Anaconda\anzjhuang\envs\py36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HIT\AppData\Local\Temp\pip-build-66nyd6fa\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 C:\Users\HIT\AppData\Local\Temp\pip-658sees_-record\install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with erro
If I ran the "python setup.py install --user",the error occurred as follows: latform Detection: Linux. Link to liblapacke... Build VarianceReduction... Build HintSVM... running install running bdist_egg running egg_info writing libact.egg-info\PKG-INFO writing dependency_links to libact.egg-info\dependency_links.txt writing requirements to libact.egg-info\requires.txt writing top-level names to libact.egg-info\top_level.txt reading manifest file 'libact.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'libact.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_py running build_ext No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'libact.query_strategies._variance_reduction' extension C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -ID:\Anaconda\anzjhuang\envs\py36\lib\site-packages\numpy\core\include -I/usr/include/ -ID:\Anaconda\anzjhuang\envs\py36\include -ID:\Anaconda\anzjhuang\envs\py36\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.6\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11 cl: 命令行 warning D9002 :忽略未知选项“-std=c11” variance_reduction.c libact/query_strategies/src/variance_reduction/variance_reduction.c(5): fatal error C1083: 无法打开包括文件: “lapacke.h”: No such file or directory error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -ID:\Anaconda\anzjhuang\envs\py36\lib\site-packages\numpy\core\include -I/usr/include/ -ID:\Anaconda\anzjhuang\envs\py36\include -ID:\Anaconda\anzjhuang\envs\py36\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.6\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11" failed with exit status 2
(py36) C:\Users\HIT\libact>python setup.py install --user Platform Detection: Linux. Link to liblapacke... Build VarianceReduction... Build HintSVM... running install running bdist_egg running egg_info writing libact.egg-info\PKG-INFO writing dependency_links to libact.egg-info\dependency_links.txt writing requirements to libact.egg-info\requires.txt writing top-level names to libact.egg-info\top_level.txt reading manifest file 'libact.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'libact.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_py running build_ext No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'libact.query_strategies._variance_reduction' extension C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -ID:\Anaconda\anzjhuang\envs\py36\lib\site-packages\numpy\core\include -I/usr/include/ -ID:\Anaconda\anzjhuang\envs\py36\include -ID:\Anaconda\anzjhuang\envs\py36\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.6\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11 cl: 命令行 warning D9002 :忽略未知选项“-std=c11” variance_reduction.c libact/query_strategies/src/variance_reduction/variance_reduction.c(5): fatal error C1083: 无法打开包括文件: “lapacke.h”: No such file or directory error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -ID:\Anaconda\anzjhuang\envs\py36\lib\site-packages\numpy\core\include -I/usr/include/ -ID:\Anaconda\anzjhuang\envs\py36\include -ID:\Anaconda\anzjhuang\envs\py36\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.6\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11" failed with exit status 2
I installed the Visual C++ build tools, but it didn't work.
It appears there are errors building the variance_reduction query_strategy. If you are not using that algorithm, you can go with
LIBACT_BUILD_VARIANCE_REDUCTION =0 pip install git+https://github.com/ntucllab/libact.git
If you need to use this algorithm, the error appears to be
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'libact.query_strategies._variance_reduction' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Maybe try updating your Visual C++ build tools and reinstall your numpy can
Does this error occur because I install the libact on the Win10?
Yes, if you have a linux environment, it should be easier to install.
Yes, if you have a linux environment, it should be easier to install.
My linux environment is CentOS, not the Debian Ubuntu. The errors occurred again in the process of installing the libact. Debian or Ubuntu is better?
Yes, if you have a linux environment, it should be easier to install.
My linux environment is CentOS, not the Debian Ubuntu. The errors occurred again in the process of installing the libact. Debian or Ubuntu is better?
Hi @hitxuer , please follow this manual. It has accomplished in the Docker container of CentOS 8.4.2105.
The steps I installed the libact as follows
pip install --user libact When I executed the fifth step, the errors occurred as follows: (py36) C:\Users\HIT\libact>pip install libact Collecting libact Using cached https://files.pythonhosted.org/packages/4b/8c/1f57cbe9e6b647afa14f8446c20caa2343fa26153be179e5a89060cd6ec2/libact-0.1.6.tar.gz Requirement already satisfied: setuptools in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: numpy in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: scipy in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: scikit-learn<=0.19.2 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: matplotlib in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: Cython in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: joblib in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from libact) Requirement already satisfied: python-dateutil>=2.1 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from matplotlib->libact) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from matplotlib->libact) Requirement already satisfied: pillow>=6.2.0 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from matplotlib->libact) Requirement already satisfied: cycler>=0.10 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from matplotlib->libact) Requirement already satisfied: kiwisolver>=1.0.1 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from matplotlib->libact) Requirement already satisfied: six>=1.5 in d:\anaconda\anzjhuang\envs\py36\lib\site-packages (from python-dateutil>=2.1->matplotlib->libact) Building wheels for collected packages: libact Running setup.py bdist_wheel for libact ... error Complete output from command D:\Anaconda\anzjhuang\envs\py36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HIT\AppData\Local\Temp\pip-build-blicsoae\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 C:\Users\HIT\AppData\Local\Temp\tmp3vc8oxoxpip-wheel- --python-tag cp36: Platform Detection: Linux. Link to liblapacke... Build VarianceReduction... Build HintSVM... running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\libact copying libact__init.py -> build\lib.win-amd64-3.6\libact creating build\lib.win-amd64-3.6\libact\base copying libact\base\dataset.py -> build\lib.win-amd64-3.6\libact\base copying libact\base\interfaces.py -> build\lib.win-amd64-3.6\libact\base copying libact\base__init.py -> build\lib.win-amd64-3.6\libact\base creating build\lib.win-amd64-3.6\libact\models copying libact\models\logistic_regression.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\perceptron.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\sklearn_adapter.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\svm.py -> build\lib.win-amd64-3.6\libact\models copying libact\models__init.py -> build\lib.win-amd64-3.6\libact\models creating build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel\binary_relevance.py -> build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel\dummy_clf.py -> build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel__init.py -> build\lib.win-amd64-3.6\libact\models\multilabel creating build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\ideal_labeler.py -> build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\interactive_labeler.py -> build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\init__.py -> build\lib.win-amd64-3.6\libact\labelers creating build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\active_learning_by_learning.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\density_weighted_meta.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\density_weighted_uncertainty_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\hintsvm.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\query_by_committee.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\quire.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\random_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\uncertainty_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\variance_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\init__.py -> build\lib.win-amd64-3.6\libact\query_strategies creating build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\adaptive_active_learning.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\binary_minimization.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\cost_sensitive_reference_pair_encoding.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\maximum_margin_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\multilabel_with_auxiliary_learner.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\init.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel creating build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\active_learning_with_cost_embedding.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\expected_error_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\hierarchical_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\mdsp.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\init__.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass creating build\lib.win-amd64-3.6\libact\utils copying libact\utils\init__.py -> build\lib.win-amd64-3.6\libact\utils running build_ext No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'libact.query_strategies._variance_reduction' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
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 Complete output from command D:\Anaconda\anzjhuang\envs\py36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HIT\AppData\Local\Temp\pip-build-blicsoae\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 C:\Users\HIT\AppData\Local\Temp\pip-7u_l4bjg-record\install-record.txt --single-version-externally-managed --compile: Platform Detection: Linux. Link to liblapacke... Build VarianceReduction... Build HintSVM... running install running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\libact copying libact__init.py -> build\lib.win-amd64-3.6\libact creating build\lib.win-amd64-3.6\libact\base copying libact\base\dataset.py -> build\lib.win-amd64-3.6\libact\base copying libact\base\interfaces.py -> build\lib.win-amd64-3.6\libact\base copying libact\base__init.py -> build\lib.win-amd64-3.6\libact\base creating build\lib.win-amd64-3.6\libact\models copying libact\models\logistic_regression.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\perceptron.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\sklearn_adapter.py -> build\lib.win-amd64-3.6\libact\models copying libact\models\svm.py -> build\lib.win-amd64-3.6\libact\models copying libact\models__init.py -> build\lib.win-amd64-3.6\libact\models creating build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel\binary_relevance.py -> build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel\dummy_clf.py -> build\lib.win-amd64-3.6\libact\models\multilabel copying libact\models\multilabel__init.py -> build\lib.win-amd64-3.6\libact\models\multilabel creating build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\ideal_labeler.py -> build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\interactive_labeler.py -> build\lib.win-amd64-3.6\libact\labelers copying libact\labelers\init__.py -> build\lib.win-amd64-3.6\libact\labelers creating build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\active_learning_by_learning.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\density_weighted_meta.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\density_weighted_uncertainty_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\hintsvm.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\query_by_committee.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\quire.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\random_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\uncertainty_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\variance_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies copying libact\query_strategies\init__.py -> build\lib.win-amd64-3.6\libact\query_strategies creating build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\adaptive_active_learning.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\binary_minimization.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\cost_sensitive_reference_pair_encoding.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\maximum_margin_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\multilabel_with_auxiliary_learner.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel copying libact\query_strategies\multilabel\init.py -> build\lib.win-amd64-3.6\libact\query_strategies\multilabel creating build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\active_learning_with_cost_embedding.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\expected_error_reduction.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\hierarchical_sampling.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\mdsp.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass copying libact\query_strategies\multiclass\init__.py -> build\lib.win-amd64-3.6\libact\query_strategies\multiclass creating build\lib.win-amd64-3.6\libact\utils copying libact\utils\init__.py -> build\lib.win-amd64-3.6\libact\utils running build_ext No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'libact.query_strategies._variance_reduction' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Command "D:\Anaconda\anzjhuang\envs\py36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\HIT\AppData\Local\Temp\pip-build-blicsoae\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 C:\Users\HIT\AppData\Local\Temp\pip-7u_l4bjg-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\HIT\AppData\Local\Temp\pip-build-blicsoae\libact\