Import mxnet | No module named mxnet | mxnet-cu90

Hey everyone!

So I just finished installing and testing NVIDIA drivers + CUDA + cuDNN and everything on that end is working correctly.

I also installed mxnet-cu90 version 1.1.0 using pip and uninstalled normal mxnet.

But now when try to validate my Python install of mxnet, Python doesn’t find mxnet at all:
import mxnet as mx results in ImportError: No module named mxnet

And this is weird, given that pip list | grep mxnet gives:
mxnet-cu90 1.1.0

So it seems like it’s there. I just can’t figure out why Python isn’t seeing it.

Thoughts?

Thanks in advance,
Brandon

I experienced similar issues, when I have different versions of python installed. So I used pip to install mxnet, but it was actually referencing a standard pip installation, where when I used python executable, it was coming from Anaconda. So, I would recommend you to check that your pip and your python are coming from the same place by doing the following:

  1. which python or which python3 (depending on Python version you use) to see the path to python
  2. Copy the path and replace it with pip (or pip3). Eg, if you get /home/ubuntu/anaconda3/bin/python3 then replace it with /home/ubuntu/anaconda3/bin/pip3 (or pip, again, depending on what you have there)
  3. Install mxnet using this full path: /home/ubuntu/anaconda3/bin/pip3 install mxnet-cu90==1.1.0

Should work.

P.S. Is there a reason you want to install 1.1.0 version? I believe that 1.3.0 is way better in terms of available features, and it is also compatible with gluon-cv and gluon-nlp. I would strongly recommend to use 1.3.0, if you don’t have any specific reason why you don’t want to do it.

Hello… based on my knowledge and issues faced i would like to add that, se common Linux repo installation applications like apt-get or yum to install pip3 (for Python 3) or pip (for Python 2). I use the former.
Use pip3 to install MXNet according to installation instruction.
You will also need some other packages which you can install through pip3.It is best to create a specific Python environment and activate the environment before using pip3 inside it.