Open diegobernardes opened 5 years ago
Hey, this is the MXNet Label Bot. Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it. Here are my recommended label(s): Build
Which pip package did you use?
Still error after successfully installed on respberry pi 4b, ubuntu 19.10.1 Python3.6
>>> import mxnet
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/.local/lib/python3.6/site-packages/mxnet/__init__.py", line 24, in <module>
from .context import Context, current_context, cpu, gpu, cpu_pinned
File "/home/ubuntu/.local/lib/python3.6/site-packages/mxnet/context.py", line 24, in <module>
from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass
File "/home/ubuntu/.local/lib/python3.6/site-packages/mxnet/base.py", line 213, in <module>
_LIB = _load_lib()
File "/home/ubuntu/.local/lib/python3.6/site-packages/mxnet/base.py", line 204, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File "/usr/local/lib/python3.6/ctypes/__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/ubuntu/.local/lib/python3.6/site-packages/mxnet/libmxnet.so: wrong ELF class: ELFCLASS32
hi, i'm getting the same error as you on my raspberry pi 3b, until Friday i will compile mxnet and try to create a wheel. I will give my best !
hi, i'm getting the same error as you on my raspberry pi 3b, until Friday i will compile mxnet and try to create a wheel. I will give my best !
To compile with no issues for the raspberry pi, at least for what i tested, add to the cmake command this parameters:
- DCMAKE_C_COMPILER=gcc-4.9 -DCMAKE_CXX_COMPILER=g++-4.9.
This will force the use of version 4.9. I tested using the demo.py file and a yolo.py example.
hi, i'm getting the same error as you on my raspberry pi 3b, until Friday i will compile mxnet and try to create a wheel. I will give my best !
To compile with no issues for the raspberry pi, at least for what i tested, add to the cmake command this parameters:
- DCMAKE_C_COMPILER=gcc-4.9 -DCMAKE_CXX_COMPILER=g++-4.9.
This will force the use of version 4.9. I tested using the demo.py file and a yolo.py example.
Compiling worked, many thanks!
After everything was compiled, just ran python3 setup.py install --user under mxnet/python, then the mxnet lib would be successfully installed.
@aGiant or @pedrooct Could you kindly share the reference link for the complete set of instructions for building mxnet on raspberry pi. Thanks
@aGiant or @pedrooct Could you kindly share the reference link for the complete set of instructions for building mxnet on raspberry pi. Thanks
HI, i created this tutorial: https://medium.com/@ce4theguys/how-to-compile-mxnet-for-raspberry-pi-fast-7e397c7c8a36 Be careful, the new version of mxnet is broken on compile, use version 1.5.1
Hope this helps!
EDIT: they appear to have fixed 1.6.0 compile errors: https://mxnet.apache.org/get_started?platform=devices&iot=raspberry-pi&
@pedrooct Thanks for the medium article, it helped a lot. I tried building mxnet on rpi itself and unfortunately it seems that the device seems to get hanged in the process and everything gets stuck. However , the process you mentioned for emulating worked perfectly. Can the build on the emulated distro be transferred to rpi directly and used as is ? Thanks
@pedrooct Thanks for the medium article, it helped a lot. I tried building mxnet on rpi itself and unfortunately it seems that the device seems to get hanged in the process and everything gets stuck. However , the process you mentioned for emulating worked perfectly. Can the build on the emulated distro be transferred to rpi directly and used as is ? Thanks
Hi ! i'm glad it helped you. Responding to the first statement, to compile it on the rpi(1/2gb) you need to increase swap memory to 2 or 3 gb. Responding to the question, when you finish the process of building the libmxnet.so you can just copy the mxnet folder to the raspberry pi and install it with pip as in the tutorial.
Hope this helps you further.
@pedrooct Thanks for the detailed instructions it worked out like a charm.
I had one additional query regarding compiling mxnet with NNPACK. According to the instructions at here, we need to make updates to the config.make file. However since you have used the cmake based flow, is there an equivalent version for compiling with NNPACK utilizing cmake instead.
@pedrooct Thanks for the detailed instructions it worked out like a charm.
I had one additional query regarding compiling mxnet with NNPACK. According to the instructions at here, we need to make updates to the config.make file. However since you have used the cmake based flow, is there an equivalent version for compiling with NNPACK utilizing cmake instead.
Sorry for the late response. I never tested NNPACK but it is something i will look into. I think rpi 3 1gb is armv6 so probably won't work, rpi4 probably will work but try it and report it :) !
Description
With a fresh Raspbian install on a Raspberry Pi 4 I'm not able to run this example. Would be nice to have a pre compiled wheel for Raspberry that includes the OpenCV. I tried to build the MXNet from the source, but I'm having an error as well.
Environment info
Error Message:
Minimum reproducible example
I've followed this installation guide.
Steps to reproduce
What have you tried to solve it?