2

I'm studing SVM and I found an interesting example here. I already have installed the cvxopt but the svmcmpl isn't installed together cvxopt and I not found how to install it. In the page is metioned the chompack but I also have it installed.

>>> import cvxopt
>>> import chompack
>>> import svmcmpl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'svmcmpl'

If I try to install via pip using the name svmcmpl I get:

$ pip install svmcmpl
Downloading/unpacking svmcmpl
  Could not find any downloads that satisfy the requirement svmcmpl
Cleaning up...
No distributions at all found for svmcmpl
Storing debug log for failure in /home/ademar/.pip/pip.log

the log:

$ cat /home/ademar/.pip/pip.log
------------------------------------------------------------
/usr/bin/pip run on Sun Dec 20 18:54:44 2015
Downloading/unpacking svmcmpl
  Getting page https://pypi.python.org/simple/svmcmpl/
  Could not fetch URL https://pypi.python.org/simple/svmcmpl/: 404 Client Error: Not Found
  Will skip URL https://pypi.python.org/simple/svmcmpl/ when looking for download links for svmcmpl
  Getting page https://pypi.python.org/simple/
  URLs to search for versions for svmcmpl:
  * https://pypi.python.org/simple/svmcmpl/
  Getting page https://pypi.python.org/simple/svmcmpl/
  Could not fetch URL https://pypi.python.org/simple/svmcmpl/: 404 Client Error: Not Found
  Will skip URL https://pypi.python.org/simple/svmcmpl/ when looking for download links for svmcmpl
  Could not find any downloads that satisfy the requirement svmcmpl
Cleaning up...
  Removing temporary dir /tmp/pip_build_root...
No distributions at all found for svmcmpl
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 277, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for svmcmpl
ademar111190
  • 14,215
  • 14
  • 85
  • 114

1 Answers1

2

I emailed the article's author and he gave me the answer.

The svmcmpl isn't a module at all, it is a script and can be downloaded on article's site here.

ademar111190
  • 14,215
  • 14
  • 85
  • 114
  • 1
    so, how to run svmcmpl? Would you please help? – Creator Feb 15 '17 at 23:08
  • @Creator download the zip with the code and import it normally, e.g.: `cd Downloads/svmcmpl && python` and `>>> import svmcmpl` – ademar111190 Feb 16 '17 at 15:42
  • Thank you, but the problem is for svmcpml i need chompack. I could not install chompack. it complains that 'complex.h' is not there. Any idea what the problem is?Th problem is similar to http://stackoverflow.com/questions/35094340/failed-with-pip-install-chompack#comment71728512_35094340 – Creator Feb 16 '17 at 22:48
  • @Creator Yes you need install both `$ pip install chompack` and `$ pip install cvxopt` I tried both on mac and linux and it works. – ademar111190 Feb 17 '17 at 19:53