kepler-cpu commented on issue #12472: Try to Setup MXnet on Raspberry Pi3 using 
MXNet installation guide using MAC but fail 
URL: 
https://github.com/apache/incubator-mxnet/issues/12472#issuecomment-422185044
 
 
   want to update this case and share some my experiences with the community...
   
   I have finally successfully cross-complied the mxnet for armv7 (Pi) - the 
whl file instructed in the mxnet doc.   The way I resolved it is using the 
latest 1.3.0 source instead of the 1.2.1 that gave me problems.  thx the the CI 
build from the mxnet team I guess :-)
   
   I am following the next step to install the whl package with pip command 
under a virtualenv.
   It looks the mxnet package is installed successfully too. 
   
   However, when I tried to test by import mxnet as mx under python 
interpreter, I got an error indicating:
   OSError: /... path to libmxnet.so : cannot open shared object file. No sun 
file or directory
   
   To get around this, I add the path to the libmxnet.so using:
   >>> import sys
   >>> sys.path.append(path to the libmxnet.so)
   
   alternatively, I would need to run the python interpreter in the same 
directory of libmxnet.so.
   
   (btw, I saw the sys.path has this path - 
'/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages, inserted in the 
end.  I assume that's added by the build script.  if so, I am wondering if the 
script should add 
'/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet' in the 
path as well? )
   
   However, I run into another problem about ImportError - see output below.
   I saw quiet few discussions about this error in the past but still not sure 
how to resolve it yet.
   
   I will dig out more but just to update this case in case someone has 
insights 
   
   //
   >>> import mxnet as mx
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File 
"/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet/__init__.py",
 line 24, in <module>
       from .context import Context, current_context, cpu, gpu, cpu_pinned
     File 
"/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet/context.py",
 line 24, in <module>
       from .base import classproperty, with_metaclass, 
_MXClassPropertyMetaClass
     File 
"/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet/base.py", 
line 214, in <module>
       _LIB = _load_lib()
     File 
"/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet/base.py", 
line 205, in _load_lib
       lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
     File "/usr/lib/python3.4/ctypes/__init__.py", line 351, in __init__
       self._handle = _dlopen(self._name, mode)
   OSError: 
/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet/libmxnet.so: 
cannot open shared object file: No such file or directory
   >>> 
   >>> import sys
   >>> print (sys.path)
   ['', '/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4', 
'/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/plat-arm-linux-gnueabihf', 
'/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/lib-dynload', 
'/usr/lib/python3.4', '/usr/lib/python3.4/plat-arm-linux-gnueabihf', 
'/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages']
   >>> 
sys.path.append('/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet')
   >>> print (sys.path)
   ['', '/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4', 
'/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/plat-arm-linux-gnueabihf', 
'/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/lib-dynload', 
'/usr/lib/python3.4', '/usr/lib/python3.4/plat-arm-linux-gnueabihf', 
'/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages', 
'/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet']
   >>> import mxnet as mx
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File 
"/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet/__init__.py",
 line 24, in <module>
       from .context import Context, current_context, cpu, gpu, cpu_pinned
     File 
"/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet/context.py",
 line 24, in <module>
       from .base import classproperty, with_metaclass, 
_MXClassPropertyMetaClass
     File 
"/home/pi/my_mxnet_work/mxnet_py3/lib/python3.4/site-packages/mxnet/base.py", 
line 31, in <module>
       from . import libinfo
   ImportError: cannot import name 'libinfo'

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to