I've inherited work on a Django we app that makes use Python modules that import svmc. When I type ./manage.py runserver I get the following:
Error: No module named svmc
sh > python >>> import svmc >>>
More bits and pieces:
So I asked a related question, which was answered, and led me here, since I can't seem to perform the necessary steps mentioned in the solution provided by said answer.
On my other machine (Linux, Ubuntu, Lucid Lynx), I've been able to install quite nicely with the package manager apt-get. I'm using Homebrew for my OS X package manager, and would prefer to avoid Darwinports, Macports or Fink to install libsvm.
- Mac OS X 10.6.4 Snow Leopard on Intel-based x86_64 architecture
- GCC 4.2
- SWIG 2.0
- Python (64-bit)
- Django 1.2.1
- setuptools, disutils, and more!
What I've Tried:
- I downloaded libsvm-2.91 from http://www.csie.ntu.edu.tw/~cjlin/libsvm/
- I unpack file, cd into python, ran make, put libsvm.so.1 and svm.so on PATH in .bash_profile, and I got the same error: no module named svmc.
- I looked at the .py files in my project referencing svmc, and noted that the only references to svmc are in the python_old directory of the downloaded files (libsvm-2.91)
- I downloaded SWIG 2.0 and installed it
- cd into libsvm-2.91/python_old
Finally, I ran (inside libsvm-2.91/python_old): sudo make cleaner rm -f *~ *.o *.so *.pyc *.pyo rm -f svmc_wrap.c sudo make all
Truncated screen vomit:
"_PyLong_Type", referenced from: SWIG_AsVal_long(_object*, long*) in svmc_wrap.o SWIG_AsVal_double(_object*, double*)in svmc_wrap.o SWIG_AsVal_unsigned_SS_long(_object*, unsigned long*)in svmc_wrap.o "_PyObject_Init", referenced from: _PySwigObject_dealloc in svmc_wrap.o _SWIG_Python_NewPointerObj in svmc_wrap.o _initsvmc in svmc_wrap.o ... "_PyTuple_SetItem", referenced from: _PySwigObject_format in svmc_wrap.o ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [svmc.so] Error 1
I would greatly appreciate any help, ideas, suggestions, or comments! Thank you, Michaux