2017-10-08 35 views
0

導入UL以下是我試圖導入MCC通用庫的Python API用於Windows:無法從mcculw

import ctypes 
from mcculw import ul 
from mcculw.enums import InterfaceType 

作爲獎勵,這裏的錯誤是Python的扔我:

File "yadayada.py", line 12, in <module> 
    from mcculw import ul 
    File "D:\Python27\lib\site-packages\mcculw\ul.py", line 39, in <module> 
    _cbw.cbAChanInputMode.argtypes = [c_int, c_int, c_int] 
    File "D:\Python27\lib\ctypes\__init__.py", line 378, in __getattr__ 
    func = self.__getitem__(name) 
    File "D:\Python27\lib\ctypes\__init__.py", line 383, in __getitem__ 
    func = self._FuncPtr((name_or_ordinal, self)) 
AttributeError: function 'cbAChanInputMode' not found 

我必須承認,我很榮幸地目睹錯誤信息,這些錯誤信息比這更明顯。

回答

0

我剛剛通過pip安裝了mcculw,但最後一次更新MCC DLL是幾年前。點擊我的方式https://www.mccdaq.com/Software-Downloads.aspx,下載了最新的MCC DAQ CD軟件包,並安裝了它,一切都開心愉快地過去了。

TL; DR:更新您的MCC DAQ軟件。