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 steps for Windows #184

Open
EsakkiSundar opened this issue Mar 22, 2021 · 12 comments
Open

Installation steps for Windows #184

EsakkiSundar opened this issue Mar 22, 2021 · 12 comments

Comments

@EsakkiSundar
Copy link

EsakkiSundar commented Mar 22, 2021

Im running into issues installing libact on my Windows10 m/c. Could some one provide me instructions on the required software which needs to be installed before installing libact.

Complete output (68 lines):
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.7
creating build\lib.win-amd64-3.7\libact
copying libact_init_.py -> build\lib.win-amd64-3.7\libact
creating build\lib.win-amd64-3.7\libact\base
copying libact\base\dataset.py -> build\lib.win-amd64-3.7\libact\base
copying libact\base\interfaces.py -> build\lib.win-amd64-3.7\libact\base
copying libact\base_init_.py -> build\lib.win-amd64-3.7\libact\base
creating build\lib.win-amd64-3.7\libact\models
copying libact\models\logistic_regression.py -> build\lib.win-amd64-3.7\libact\models
copying libact\models\perceptron.py -> build\lib.win-amd64-3.7\libact\models
copying libact\models\sklearn_adapter.py -> build\lib.win-amd64-3.7\libact\models
copying libact\models\svm.py -> build\lib.win-amd64-3.7\libact\models
copying libact\models_init_.py -> build\lib.win-amd64-3.7\libact\models
creating build\lib.win-amd64-3.7\libact\models\multilabel
copying libact\models\multilabel\binary_relevance.py -> build\lib.win-amd64-3.7\libact\models\multilabel
copying libact\models\multilabel\dummy_clf.py -> build\lib.win-amd64-3.7\libact\models\multilabel
copying libact\models\multilabel_init_.py -> build\lib.win-amd64-3.7\libact\models\multilabel
creating build\lib.win-amd64-3.7\libact\labelers
copying libact\labelers\ideal_labeler.py -> build\lib.win-amd64-3.7\libact\labelers
copying libact\labelers\interactive_labeler.py -> build\lib.win-amd64-3.7\libact\labelers
copying libact\labelers_init_.py -> build\lib.win-amd64-3.7\libact\labelers
creating build\lib.win-amd64-3.7\libact\query_strategies
copying libact\query_strategies\active_learning_by_learning.py -> build\lib.win-amd64-3.7\libact\query_strategies
copying libact\query_strategies\density_weighted_meta.py -> build\lib.win-amd64-3.7\libact\query_strategies
copying libact\query_strategies\density_weighted_uncertainty_sampling.py -> build\lib.win-amd64-3.7\libact\query_strategies
copying libact\query_strategies\hintsvm.py -> build\lib.win-amd64-3.7\libact\query_strategies
copying libact\query_strategies\query_by_committee.py -> build\lib.win-amd64-3.7\libact\query_strategies
copying libact\query_strategies\quire.py -> build\lib.win-amd64-3.7\libact\query_strategies
copying libact\query_strategies\random_sampling.py -> build\lib.win-amd64-3.7\libact\query_strategies
copying libact\query_strategies\uncertainty_sampling.py -> build\lib.win-amd64-3.7\libact\query_strategies
copying libact\query_strategies\variance_reduction.py -> build\lib.win-amd64-3.7\libact\query_strategies
copying libact\query_strategies_init_.py -> build\lib.win-amd64-3.7\libact\query_strategies
creating build\lib.win-amd64-3.7\libact\query_strategies\multilabel
copying libact\query_strategies\multilabel\adaptive_active_learning.py -> build\lib.win-amd64-3.7\libact\query_strategies\multilabel
copying libact\query_strategies\multilabel\binary_minimization.py -> build\lib.win-amd64-3.7\libact\query_strategies\multilabel
copying libact\query_strategies\multilabel\cost_sensitive_reference_pair_encoding.py -> build\lib.win-amd64-3.7\libact\query_strategies\multilabel
copying libact\query_strategies\multilabel\maximum_margin_reduction.py -> build\lib.win-amd64-3.7\libact\query_strategies\multilabel
copying libact\query_strategies\multilabel\multilabel_with_auxiliary_learner.py -> build\lib.win-amd64-3.7\libact\query_strategies\multilabel
copying libact\query_strategies\multilabel_init_.py -> build\lib.win-amd64-3.7\libact\query_strategies\multilabel
creating build\lib.win-amd64-3.7\libact\query_strategies\multiclass
copying libact\query_strategies\multiclass\active_learning_with_cost_embedding.py -> build\lib.win-amd64-3.7\libact\query_strategies\multiclass
copying libact\query_strategies\multiclass\expected_error_reduction.py -> build\lib.win-amd64-3.7\libact\query_strategies\multiclass
copying libact\query_strategies\multiclass\hierarchical_sampling.py -> build\lib.win-amd64-3.7\libact\query_strategies\multiclass
copying libact\query_strategies\multiclass\mdsp.py -> build\lib.win-amd64-3.7\libact\query_strategies\multiclass
copying libact\query_strategies\multiclass_init_.py -> build\lib.win-amd64-3.7\libact\query_strategies\multiclass
creating build\lib.win-amd64-3.7\libact\utils
copying libact\utils_init_.py -> build\lib.win-amd64-3.7\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.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\libact
creating build\temp.win-amd64-3.7\Release\libact\query_strategies
creating build\temp.win-amd64-3.7\Release\libact\query_strategies\src
creating build\temp.win-amd64-3.7\Release\libact\query_strategies\src\variance_reduction
E:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ie:\softwares\python\lib\site-packages\numpy\core\include -I/usr/include/ -Ie:\softwares\python\include -Ie:\softwares\python\include -IE:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.7\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11
cl : Command line warning D9002 : ignoring unknown option '-std=c11'
variance_reduction.c
libact/query_strategies/src/variance_reduction/variance_reduction.c(5): fatal error C1083: Cannot open include file: 'lapacke.h': No such file or directory
error: Command "E:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ie:\softwares\python\lib\site-packages\numpy\core\include -I/usr/include/ -Ie:\softwares\python\include -Ie:\softwares\python\include -IE:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tclibact/query_strategies/src/variance_reduction/variance_reduction.c /Fobuild\temp.win-amd64-3.7\Release\libact/query_strategies/src/variance_reduction/variance_reduction.obj -std=c11" failed with exit status 2

@yangarbiter
Copy link
Collaborator

I think you'll have to either install lapacke or install the package without hintsvm and variance_reduction
https://github.com/ntucllab/libact#installation-options

@PedroSPSantos
Copy link

Was installing the module as well and was searching for a issue that showed my error and found this one. There is a question that came to mind: "What files are supposed to be in the libact library?" If its the ones on the print I m attaching we could just add the module to the lib folder on python where the modules are installed(C:\Users\User\AppData\Local\Programs\Python\Python36\Lib\site-packages) and add lapacke.h file somewhere(since its available at the lapack website) and change up the python import to import the .h file from where we put it correct? @yangarbiter
print1

@yangarbiter
Copy link
Collaborator

I am not super familiar with windows right now. I guess you will need to set some environment variable (PATH in linux) to the directory of the lapacke.h.

I think you might need some other files other than the header file lapacke.h. I found this website. Do you want to take a look and see if you can get it installed?

@PedroSPSantos
Copy link

PedroSPSantos commented Jul 15, 2021

I can try to help not only me but others to solve this issue on windows, but by the looks of things in MacOs as well(from other issues I saw in the github). Btw is it normal to see this error message if u say to libact u dont want to install variance_reduction?And it also does the same for when u try to say to libact that u dont want variance_reduction and hintsvm(no issue found for hintsvm tho, as shown on second print (cmd

cnd2
)

@yangarbiter
Copy link
Collaborator

yangarbiter commented Jul 15, 2021

Could you try installing the package with this command (without the py -3.6 -m in the beginning and the space between space between LIBACT_BUILD_HINTSVM and 1.

LIBACT_BUILD_HINTSVM=1 pip install git+https://github.com/ntucllab/libact.git

If you really wants to run py -3.6 -m you should do

LIBACT_BUILD_VARIANCE_REDUCTION=1 LIBACT_BUILD_HINTSVM=1 py -3.6 -m pip install git+https://github.com/ntucllab/libact.git

@yangarbiter
Copy link
Collaborator

We know that LAPACKE is hard to install in many other operating systems. @ariapoy is trying another way to remove the requirement of LAPACKE. Hopefully we can make the installation process easier soon.

@PedroSPSantos
Copy link

Could you try installing the package with this command (without the py -3.6 -m in the beginning and the space between space between LIBACT_BUILD_HINTSVM and 1.

LIBACT_BUILD_HINTSVM=1 pip install git+https://github.com/ntucllab/libact.git

If you really wants to run py -3.6 -m you should do

LIBACT_BUILD_VARIANCE_REDUCTION=1 LIBACT_BUILD_HINTSVM=1 py -3.6 -m pip install git+https://github.com/ntucllab/libact.git

U cannot use it like that in windows , as is shown in the print I attach... It throws out a libact build variance reduction is not a command as it should, cause in windows u should put first the command in the command prompt and then the variables, hence y that error
cmd3

@PedroSPSantos
Copy link

PedroSPSantos commented Jul 15, 2021

We know that LAPACKE is hard to install in many other operating systems. @ariapoy is trying another way to remove the requirement of LAPACKE. Hopefully we can make the installation process easier soon.

Hopefully! But I m also trying to see a solution to help windows users for now, so that this issue becomes solved and u can add it later to something in the readme in case lapacke is indeed a important package for the code and cant be replaced

@PedroSPSantos
Copy link

We know that LAPACKE is hard to install in many other operating systems. @ariapoy is trying another way to remove the requirement of LAPACKE. Hopefully we can make the installation process easier soon.

Hopefully! But I m also trying to see a solution to help windows users for now, so that this issue becomes solved and u can add it later to something in the readme in case lapacke is indeed a important package for the code and cant be replaced

Do u know(from installing it on your own pc) what files should be imported and inside of the package?
In other words is all the files inside of the github master needed? Or only the ones inside of the libact folder for libact to run?
So I can try and help the windows users out(and help u as well) with this recurring issue and try to find a fix for u as well for this issue, since the module itself seems interesting and I would love to help you out with this and let more people experience this package with no issues.

@yangarbiter
Copy link
Collaborator

yangarbiter commented Jul 15, 2021

Can you try to set the environment variables like mentioned here?
https://superuser.com/questions/79612/setting-and-getting-windows-environment-variables-from-the-command-prompt

Something like

set LIBACT_BUILD_VARIANCE_REDUCTION=1
set LIBACT_BUILD_HINTSVM=1
pip install git+https://github.com/ntucllab/libact.git

@PedroSPSantos
Copy link

Can you try to set the environment variables like mentioned here?
https://superuser.com/questions/79612/setting-and-getting-windows-environment-variables-from-the-command-prompt

Something like

set LIBACT_BUILD_VARIANCE_REDUCTION=1
set LIBACT_BUILD_HINTSVM=1
pip install git+https://github.com/ntucllab/libact.git

I can try and give u a result for it

@PedroSPSantos
Copy link

After doing the sets it did the installation with the error with variance reduction on 1 as shown in the first print. So it seemed the set did nothing,
cmd5
But as soon as I did set Variance reduction to 0 on the set command no errors occurred as shown here:
cmd4

So we know the way on windows to do the setting of the variables is with this part of code u suggested with the set command(not sure if same for MacOs, I can try and search it to help u respond as well to MacOs user issue) One thing stood out tho . If LIBACT_BUILD_VARIANCE_REDUCTION = 0 should the file even be in the package? Cause that's what happened to me as I did that. Shouldn't it mean that the query strategy is not to be there? In the mean time(although I wanted to install the package for the hintSVM Algorithm) I ll try and help u solving the Variance Reduction issue so that people that really want to use the variance reduction can have a easy way of installing the package and having that working 😄

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

No branches or pull requests

3 participants