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.

https://medium.com/@virajdeshwal/building-mxnet-for-arch64-97f983dd6d37

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 https://github.com/apache/incubator-mxnet they suggest using https://discuss.mxnet.io/ for asking questions and https://github.com/apache/incubator-mxnet/issues for reporting bugs.
probably you could find some additional information there;
building from source https://mxnet.apache.org/get_started/ubuntu_setup
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.

@_av @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 https://mxnet.apache.org/get_started/jetson_setup

1 Like