no module named cntk

Viewed 1697
from __future__ import print_function # Use a function definition from future version (say 3.x from 2.7 interpreter)
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
import sys
import os

import cntk as C

%matplotlib inline

And I get the error :

no module named cntk

2 Answers

From whatever terminal you are starting your jupyter notebook. Type pip install cntk in that terminal. Then start your jupyter notebook from the same.

If in case you are using anaconda environments. Start the terminal of that virtual environment, your prompt should now say (yourenv)username: then install by running the same pip install cntk or if it's available in conda distributions use conda install cntk.

Try running this , hope that will solve your problem.

apt-get install --no-install-recommends openmpi-bin libopenmpi-dev libopencv-dev python3-opencv python-opencv && ln -sf /usr/lib/x86_64-linux-gnu/libmpi_cxx.so /usr/lib/x86_64-linux-gnu/libmpi_cxx.so.1 && ln -sf /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so.12 && ln -sf /usr/lib/x86_64-linux-gnu/libmpi.so /usr/lib/x86_64-linux-gnu/libmpi.so.12 && pip install cntk
Related