Giter Club home page Giter Club logo

libsvm's Introduction

Personal Site

Requirements

The project is working with the following versions:

  • Node: v13.5.0
  • NPM version: 6.13.4

Run in Development

  1. Install the dependencies running npm install.
  2. Make sure that you are using react-static that is installed in this package, not the global one.
  3. Run react-static start.

Deploy to Production

  1. Create an orphan branch in the main repository.
git checkout --orphan gh-pages

Common Errors

Build Fails

When running react-static build the error happens:

Module build failed (from ./babel-loader/lib/index.js):
TypeError: /path/to/project/artifacts/react-static-templates.js: Property value expected type of string but got null

It is because the package react-static is installed globally and the minimum node version is 10.16.0 according to this link. The build was tested using node version: v13.5.0 and npm version: 6.13.4.

libsvm's People

Contributors

ocampor avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pablodecm

libsvm's Issues

build fails on windows10

python 3.6.4
windows10 64 bit

Hi, I am trying to install libsvm on Windows using pip. I made sure to run the command as Administrator. I get the following error dump:

C:\WINDOWS\system32>pip install libsvm
Collecting libsvm
Using cached https://files.pythonhosted.org/packages/ff/01/5506c690789f1d76105815d826f213ce724960851be45799d7023ed1aee7/libsvm-3.23.0.tar.gz
Building wheels for collected packages: libsvm
Building wheel for libsvm (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\fischeru\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\fischeru\AppData\Local\Temp\pip-install-l2fy__yl\libsvm\setup.py'"'"'; file='"'"'C:\Users\fischeru\AppData\Local\Temp\pip-install-l2fy__yl\libsvm\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\fischeru\AppData\Local\Temp\pip-wheel-xw6smf_n' --python-tag cp36
cwd: C:\Users\fischeru\AppData\Local\Temp\pip-install-l2fy__yl\libsvm
Complete output (79 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\libsvm
copying libsvm\commonutil.py -> build\lib.win-amd64-3.6\libsvm
copying libsvm\svm.py -> build\lib.win-amd64-3.6\libsvm
copying libsvm\svmutil.py -> build\lib.win-amd64-3.6\libsvm
copying libsvm_init_.py -> build\lib.win-amd64-3.6\libsvm
running egg_info
creating libsvm.egg-info
writing libsvm.egg-info\PKG-INFO
writing dependency_links to libsvm.egg-info\dependency_links.txt
writing requirements to libsvm.egg-info\requires.txt
writing top-level names to libsvm.egg-info\top_level.txt
writing manifest file 'libsvm.egg-info\SOURCES.txt'
reading manifest file 'libsvm.egg-info\SOURCES.txt'
writing manifest file 'libsvm.egg-info\SOURCES.txt'
running build_ext
building 'libsvm' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
creating build\temp.win-amd64-3.6\Release\src\libsvm
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\fischeru\appdata\local\programs\python\python36\include -Ic:\users\fischeru\appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tpsrc/libsvm/svm.cpp /Fobuild\temp.win-amd64-3.6\Release\src/libsvm/svm.obj
svm.cpp
src/libsvm/svm.cpp(53): warning C4996: 'vsprintf': This function or variable may be unsafe. Consider using vsprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

*** lots of similar warnings ***

C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt\string.h(439): note: Siehe Deklaration von "strtok"
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\fischeru\appdata\local\programs\python\python36\libs /LIBPATH:c:\users\fischeru\appdata\local\programs\python\python36\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x64" /EXPORT:PyInit_libsvm build\temp.win-amd64-3.6\Release\src/libsvm/svm.obj /OUT:build\lib.win-amd64-3.6\libsvm.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\src/libsvm\libsvm.cp36-win_amd64.lib
LINK : error LNK2001: Nicht aufgelöstes externes Symbol "PyInit_libsvm".
build\temp.win-amd64-3.6\Release\src/libsvm\libsvm.cp36-win_amd64.lib : fatal error LNK1120: 1 nicht aufgelöste Externe
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\link.exe' failed with exit status 1120

ERROR: Failed building wheel for libsvm
Running setup.py clean for libsvm
Failed to build libsvm

Not sure why the linker is involved, the error is the german Version of 'unresolved external symbol'. I thought this is supposed to be pre-built. Any input on what is going on would be much appreciated.

UnicodeDecodeError is raised when parse README.rst

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\zkong\AppData\Local\Temp\pip-install-3ksrxrho\libsvm\setup.py", line 18, in <module>
        LONG_DESCRIPTION = readme.read()
    UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 3028: illegal multibyte sequence

Python text encoding depends on system. The Windows that use Chinese as system language uses cp936(GBK) encoding as the default text encoding, it can't parse unicode.

There are two solutions:

  1. Replace open(path) with open(path, encoding='UTF-8')

    with open(os.path.join(ROOT_PATH, 'README.rst'), 'r') as readme:

  2. Replace ``AS IS’’ with "AS IS"

    \``AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

Compatibility conflict with upstream

Hi,

the Python module being built places svm, svmutil, and commonutil in its own namespace, instead of the global one. While reasonable (commonutil is a quite generic name, after all), this breaks code that expects svm and svmutil at their historical locations.

We've encountered this in Debian, with a dependent package expecting the new location. However, given that the old location has been around since 2006, switching our packaged python-libsvm to the new location could potentially break a lot of existing code, so we'll stick with upstream's version approach for now.

Please coordinate with upstream as to how best resolve this location conflict.

(If commonutil is the issue, one possible solution would be to integrate it into svmutil, as effectively, that is what happens within svmutil.py anyway.)

Update to v330 and PyPi package confusion

Are there plans about updating this to v330 as within the official code repository [0]?

Otherwise it would be very confusing in regards to the PyPi package version under [1] which links in the README and documentation to the original repository but the builds are coming from this repository.
Are there further any plans on switching the PyPi sources so that the official maintainers can use libsvm instead of libsvm-official?

[0] https://github.com/cjlin1/libsvm/releases/tag/v330
[1] https://pypi.org/project/libsvm/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.