AGX Xavier install MXNet failed

Hi all,

I was installing mxnet on my Xavier (with JetPack 4.3) using pip3.

After pip3 install mxnet-cu100, the installation was completed without problem.

But when import mxnet in python3, it raised an error OSError: /home/user/.local/lib/python3.6/site-packages/mxnet/libmxnet.so: cannot open shared object file: No such file or directory. I checked the directory and there was a file named libmxnet.so.

I also tried to uninstall the previous mxnet-cu100 and follow the installation instructions in this link https://forums.developer.nvidia.com/t/i-was-unable-to-compile-and-install-mxnet1-5-with-tensorrt-on-the-jetson-nano-is-there-someone-have-compile-it-please-help-me-thank-you/111303#5426042, but it raised the save error.

Any idea how to solve this problem?

Many thanks,
Wenbin Xu

Have you seen this post? I’m not a big fan of Medium but sometimes you can find something.

Building MxNet for Arch64. Apache MXNet is a fast and scalable… | by Viraj Deshwal | Medium

Thank you for your reply. I haven’t tried to build mxnet from source.

I just followed the official instructions to install mxnet and failed, figured it would be useful to find out why.

Hi,

Please try to add the mxnet directory into LD_LIBRARY_PATH.

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mxnet

Thanks.

Hi,

There is no directory named /usr/local/mxnet in my system after my pip installation of mxnet

@Wenbin_Xu,
did you try methods other than pip install?
here GitHub - apache/incubator-mxnet: Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more they suggest using https://discuss.mxnet.io/ for asking questions and Issues · apache/incubator-mxnet · GitHub for reporting bugs.
probably you could find some additional information there;
building from source Ubuntu Setup | Apache MXNet
more reference https://mxnet.apache.org/

Hi,

Could you help to locate the library and add it into the LD_LIBRARY_PATH manually?

$ sudo find / -iname libmxnet.so

We test the installation in our environment and the above the LD_LIBRARY_PATH setting works for us.
Thanks.

@Andrey1984 @AastaLLL

Hi,

Thank you for your replay.

I solved the problem by executing sudo pip3 instead of pip3. But I’m still confused, I thought running pip with root permission is not a good idea and should be avoided. Why we are using sudo pip3 and what does sudo command affect the installation in this case?

Many thanks,
Wenbin Xu

Hi,

Sometimes the installation directory is different with or without root.
And it might cause some issue when library loading.

Thanks.

1 Like

here is also Jetson Setup | Apache MXNet

1 Like