Outline
- Install PC/SC Driver
- Install a library
- Install Python module, py-acr122u, not nfcpy
- Connect to USB
- Put NFC card
- Connect from Python
Environment
- Macbook Air M1
- macOS 26.2
- Python 3.13.5
Procedure
-
Install PC/SC Driver
-
Install a library
brew install pcsc-lite -
Install Python module
- nfcpy does not work
- Use py-acr122u instead
python3 -m venv myvenv source myvenv/bin/activate pip install py-acr122u -
Connect to USB
-
Put NFC card
-
Connect from Python
from py_acr122u import nfc reader = nfc.Reader() reader.connect() uid = reader.get_uid() reader.print_data(uid) reader.info()You may see an erro something like this if NFC is not on reader.
py_acr122u.error.NoCommunication: The reader has been deleted and no communication is now possible. Smartcard error code : 0x7FEFFF97 Hint: try to connect a card to the reader