值错误:没有后端可用

2024-10-04 01:30:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试在macosx10.9.5上使用ACR122U和用于python2.7的nfcpy库/模块。在

我按照这个网站上的说明操作了:http://nfcpy.readthedocs.org/en/latest/topics/get-started.html,但在键入以下内容时仍然出现错误:

clf = nfc.ContactlessFrontend('usb')

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    clf = nfc.ContactlessFrontend('usb')
  File "nfc/clf.py", line 105, in __init__
    if path and not self.open(path):
  File "nfc/clf.py", line 156, in open
    self.dev = nfc.dev.connect(path)
  File "nfc/dev/__init__.py", line 55, in connect
    found = transport.USB.find(path)
  File "nfc/dev/transport.py", line 169, in find
    for d in cls.usb_core.find(find_all=True, **match)]
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/usb/core.py", line 1199, in find
    raise ValueError('No backend available')
ValueError: No backend available

有什么想法吗?在


Tags: pathinpydevselfinitlineopen