GPIO mraa - No attribute 'Gpio'

Hello,

I am looking to use the GPIO on a Zero 3W. I followed the instructions in Mraa | Radxa Docs to install mraa. All the CLI commands worked, listing out all the pins, but when running the code, it failed to import mraa.

I moved the mraa folder into usr/lib/python3/dist-packages and the code ran, however, I got the error AttributeError: module 'mraa' has no attribute 'Gpio'

Any help would be appreciated, I hope someone has used mraa successfully. gpiod is a bit hard to use.

Thank you,
Nick

Apologies, I resolved it partially.

I git cloned the repository directly in the usr/lib/python3/dist-packages. Now I am having issues with setting some pins, but the library functions work for the most part.

EDIT: So I when listing gpio, pins 3,5,8, and 10 don’t have GPIO on the right, despite being named GPIO. But when listing using gpioinfo, it looks okay? Any help would be appreciated.

I completely missed this note on the documentation site, so pins 3 and 5 are configured internally for I2C, so they cannot be used at all. Thank you Radxa support.

If I am installing mraa in a venv environment, where should I git clone and install the library? I tried cloing it in .venv/lib/python3.11/site-packages, but it didn’t get recognized as an import. Any ideas?

Thank you