Elegant way to install libsvm

Table of contents

 Install libsvm library in python environment

Install libsvm library in Anaconda environment

 Installation resultsEdit


 Install libsvm library in python environment

After reading many posts about installing libsvm, I found that most of them need to download packages, which is so troublesome.

Let's take a look at the website of libsvm: LIBSVM -- A Library for Support Vector Machines

A relatively classic library written by Taiwanese.

 The homepage of the website also prompts the installation statement:

Why do I report an error when using pycharm directly? Because pycharm automatically installs for you, it actually executes pip install libsvm

But this package is no longer called that name, so it reported an error. The correct way to install pip is as follows:

pip install -U libsvm-official

If there is an error reporting problem during this process, please continue to read:

 It's well installed, but an error is reported? why? Because this part of the package uses C++, you need to go to Microsoft's website to download it.

During the process of installing the python package, I encountered an error that Microsoft Visual C++ 14.0 is required. The reason is that c++ compilation is required during the installation process using pip install, and some have relatively high dependencies on the compiler .

 Download and install the Microsoft C++ build tool, if the download is 0kb/s, please see this thread

w11 about 0kb/s microsoft download problem

The installation is complete. Note that you need to install the 14 package according to the error prompt

 The installation is complete.

Install libsvm library in Anaconda environment

For anaconda, enter the corresponding conda environment to install.

 installation result

 It can be seen that there is no error reported.

Guess you like

Origin blog.csdn.net/qq_41722524/article/details/125657545