Reputation: 418
I am trying to install the new MXNet from
validate-mxnet-installation.
I followed the instructions
(I chose options Linux->python->GPU->pip ) as you can see on the website and they were:
install pip using these bunch of lines:
$ sudo apt-get update
$ sudo apt-get install -y wget python
$ wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py
$ pip install mxnet-cu80
To validate I was required to run the following:
python
to start python type the following:
import mxnet as mx
a = mx.nd.ones((2, 3), mx.gpu())
b = a * 2 + 1
b.asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
I am getting the following error when I try to run the above:
>>> import mxnet as mx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mxnet
I'm kind of lost.. Does anyone know what should I do?
Upvotes: 3
Views: 7989
Reputation: 95
Use 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.
This way, you can have isolated installation in those environments.
Upvotes: 0
Reputation: 418
I figured what the problem was:
mxnet wasn't installed correctldue to lack of premissions.
In step 5 need to type: sudo pip install mxnet-cu80
instead of just
"pip install mxnet-cu80 "
Thanks everyone
Upvotes: 2