ocampor / libsvm Goto Github PK
View Code? Open in Web Editor NEWPre-built LibSVM packages for Python.
License: BSD 3-Clause "New" or "Revised" License
Pre-built LibSVM packages for Python.
License: BSD 3-Clause "New" or "Revised" License
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 ***
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.
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.)
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:
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/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.