Re: [問題] 一直call不到 dll ...
※ 引述《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)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 3 篇):
Python 近期熱門文章
PTT數位生活區 即時熱門文章