作者tickon (去你该去的未来)
看板Python
标题Re: [问题] 一直call不到 dll ...
时间Mon Jan 15 17:01:28 2007
※ 引述《tickon (去你该去的未来)》之铭言:
: 各位大大...
: 小弟有一个dll (svmc.dll)档...
: 但是执行的时候老是显示以下讯息:
: C:\Python25\exp>svm_test.py
: Traceback (most recent call last):
: File "C:\Python25\exp\svm_test.py", line 7, in <module>
: import svm
: File "C:\Python25\exp\svm.py", line 18, in <module>
: import svmc
: ImportError: No module named svmc
: 我把svmc.lib copy 到 \Python25\libs 里了...
: svmc.dll 有放到\Python25\DLLs 里面..
: 不但如此.. 到处都放了一份svmc.dll..
: 一直显示找不到的讯息.. 应该如何是好?
: 谢谢各位大大 拜谢 T_T
... 我按照了以下的程序:
... To build python interface, download and install Python.
Edit Makefile.win and change PYTHON_INC and PYTHON_LIB to your
python installation. Type nmake -f Makefile.win python
and then copy windows\python\svmc.dll to the python directory.
... ^^^^^^^^^^^^^^^^^^^^^^^^
Qa: 这是指 1. 档案执行目录? 2. C:\Python\DLLs?
For win32 systems, the shared library svmc.dll is ready in the
directory windows/python. You need to copy it to this directory.
...
Qb: 请问各位大大,这一步一般是指 copy .dll 档到那里呢?
Usage
=====
To use the module, the files svm.py and the shared library
(namely svmc.so or svmc.dll) must be placed in the current directory,
the python library directory, or the directory where the
environment variable PYTHONPATH points to.
The user then imports everything in svm.py to use libsvm in python:
from svm import *
There are three classes in svm.py...
若有小白问题请见谅,再度拜谢 Orz
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.114.71.162
※ 编辑: tickon 来自: 140.114.71.162 (01/15 19:19)