Mxnet Installation on ubuntu 18.04

Hello,
I am trying to install mxnet on ubuntu, but the problem is that it automatically installs the packages in the python 2.7 directories instead of the newer version python3.6.
Can anyone help me? Thank you!

Hi @ocfrank,

Assuming you’re using pip to do the installs, you need to make sure you’re using the correct pip for the python environment you want to install mxnet in. It depends on how you installed python3.6 (e.g. used virtualenv, conda, etc), but you might want to try:

pip3 install mxnet

Or if you’re using Conda:

source activate <your_python_env>
# if you don't already have it installed for the conda env
conda install pip
pip install mxnet

You should be having similar issues for other packages though. Or is this specific to MXNet?

Hi @thomelane,
Thank you for your help, I was using the wrong pip command to do the installs.
I have tried to run the script from https://gluon-cv.mxnet.io/build/examples_detection/demo_ssd.html#sphx-glr-build-examples-detection-demo-ssd-py, is the last Image supposed to appear after running the script?

Yes, I’d expect it to show if you have a graphical user interface, but not if you’re ssh-ing onto a remote machine. Are any plots working for you? Give https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py a try to confirm.

I see, I am using Ubuntu without GUI so that is why. Thank you again for all your help!

Try install with pip3 rather than pip. If you don’t have pip3 install it before. The best way should be to create a virtual environment with python3, activate the environment and install mxnet