How to install python3 rockpi4 mraa

Hi,
I followed link (https://wiki.radxa.com/Rockpi4/dev/libmraa) to install mraa library.
python2 is working fine.
We using python3 for our development that’s why we want to use python3 rockpi4 mraa library.
How can i install python3 rockpi4 mraa library ?

Thanks & Regards
Vasu

Hi vasudhevan,

Work In Process.

Hi setq,
Did you find out how to use mraa library for python3?

Thanks & Regards
Vasu

This is my work today. I’ll let you know if I make any progress.

Hi ,
I will update the package later.

Hi setq,
Thank you for your response.
We waiting for your reply.

Thanks & Regards
Vasu

Hi vasudhevan,

Please update libmraa-rockpi4 package from testing repo of Radxa APT

I got error

root@localhost:/boot# sudo apt-get install linux-4.4-latest
Reading package lists… Done
Building dependency tree
Reading state information… Done
linux-4.4-latest is already the newest version (4.4.154-99-rockchip).
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
linux-4.4-latest : Depends: linux-image-4.4.154-99-rockchip-g5b699a48544d but it is not going to be installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).
root@localhost:/boot# sudo apt-get install libmraa-rockpi4
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
libmraa-rockpi4 : Depends: python but it is not going to be installed
Depends: libpython2.7 but it is not going to be installed
linux-4.4-latest : Depends: linux-image-4.4.154-99-rockchip-g5b699a48544d but it is not going to be installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).
root@localhost:/boot#

Try ‘apt --fix-broken install’ ?

Hi setq,
Thank you for your response.
Trying to generate binary using pyinstaller i am getting error (both python2,python3).

       Traceback (most recent call last):
       File "tset.py", line 2, in <module>
       ModuleNotFoundError: No module named 'mraa'
      [1555] Failed to execute script test

Other pip installed modules is contains our code that is working only libmraa we getting error if i execute manually python code working.
I want to generate binary any other method is there without facing any issue with libmraa library ?

python3 libmraa working.
/boot/hw_intfc.conf is not present update kernel 4.4.154-99-rockchip (export DISTRO=bionic-testing).

Thanks & regards
Vasu

Reinstall linux-4.4-latest and libmraa-rockpi4

Maybe you need to manually delete the old kernel because the remaining space of /boot is too small.

I want to generate binary any other method is there without facing any issue with libmraa library ?


Just download mraa from https://github.com/intel-iot-devkit/mraa and make.

I want to generate python executable.

The mraa library contains python file and shared object file.

Do you mean to generate a package that pip can use?

No our python code used mraa library we want to generate python file to executable file.
When we generating executable using pyinstaller.
While execution of python code ./gpio_test i am getting error import mraa module not found.
Manually execute python gpio_test.py working fine.

Maybe you need to search for information about pyinstaller.

Edit gpio_test.spec file, add /usr/local/lib/python3.6/dist-packages/mraa.py’ to the first parameter of Analysis, like this:

a = Analysis([‘gpio_test.py’, ‘/usr/local/lib/python3.6/dist-packages/mraa.py’],

ps. This is just a pure Python problem.