summitcross
summitcross

Reputation: 53

Shogun Installation windows

could anyone here provide an easy to follow instruction on how to install shogun-ml (http://www.shogun-toolbox.org/) on windows 10 and make it work with Python 3?

I've searched and tried all instructions I found but neither of them worked...I also installed cmake and cygwin but as I've never used any of them before I'm pretty lost and would appreciate any help!

Thanks alredy in advance!

Edit: What I tried is:

Could not find a version that satisfies the requirement shogun (from versions: ) No matching distribution found for shogun

(I changed -G"%VSVER%" to Visual Studio and added the Python interface compared to the original) ....but that's where I'm already stuck, as I get one of the following error messages:

CMake Error: The source directory "..~/Shogun/CMakeFiles" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.

or (when I try it in a different folder or when I copy a cmakelist into the former folder (I'm pretty sure that's not the right thing to do, but as I said, I've no idea how it works))

-- Selecting Windows SDK version to target Windows 10.0.15063. CMake Error at CMakeLists.txt:27 (project): Failed to run MSBuild command: MSBuild.exe to get the value of VCTargetsPath: Das System kann die angegebene Datei nicht finden -- Configuring incomplete, errors occurred!

the german part says that the system can't find the file...I looked for the file and it exists, but in a different subfolder - but trying the command in the respective folder gives the same error

If you need any other information I'd be more than happy to provide it, but as I know so little about this I've no idea what might be useful...

Thanks again!

Upvotes: 0

Views: 1199

Answers (1)

Viktor
Viktor

Reputation: 298

-DCMAKE_BUILD_TYPE= should be Debug or Release. Moreover, cmake command you have pasted should be executed from a directory of created within the source you have cloned. So, for example:

git clone https://github.com/shogun-toolbox/shogun.git cd shogun mkdir build cd build cmake -G"Visual Studio 15 2017" -DCMAKE_BUILD_TYPE=Release - DBUILD_META_EXAMPLES=OFF -DENABLE_TESTING=ON -DINTERFACE_PYTHON=ON ..

but for being able to compile the python interface you need to have Swig. The easiest way actually to install Anaconda and install Swig:

conda install -c anaconda swig

you could also install GLPK and other dependencies of shogun (see conda-forge for possible packages), and finally once you are done with setting up anaconda, you could compile shogun with python interface:

cmake -G"Visual Studio 15 2017" -DCMAKE_BUILD_TYPE=Release -DBUILD_META_EXAMPLES=OFF -DINTERFACE_PYTHON=ON -DCMAKE_PREFIX_PATH=<path to the root of anaconda> -DCMAKE_INSTALL_PREFIX=<path to the root of anaconda> -DBUNDLE_NLOPT=OFF ..

Upvotes: 2

Related Questions