Having problems running the labs on my device

I have downloaded the Jupyter Notebooks provided in the labs and when I am running them on my laptop locally with python I am getting “ModuleNotFoundErrors”

For example from week 3 of course 1 of the ML specialization:

I run


 import numpy as np
%matplotlib widget
import matplotlib.pyplot as plt
from lab_utils_common import  plot_data, sigmoid, dlc
plt.style.use('./deeplearning.mplstyle')

import numpy as np
%matplotlib widget
import matplotlib.pyplot as plt
from lab_utils_common import plot_data, sigmoid, dlc
plt.style.use(‘./deeplearning.mplstyle’)

And I get:

      2 get_ipython().run_line_magic('matplotlib', 'widget')
      3 import matplotlib.pyplot as plt
----> 4 from lab_utils_common import  plot_data, sigmoid, dlc
      5 plt.style.use('./deeplearning.mplstyle')

ModuleNotFoundError: No module named 'lab_utils_common'```

I did try to install the modules seperately but I haven’t been able to resolve this issue. 

Can anybody help ? Thanks in advance!
1 Like

Downloading a notebook alone is not enough. You have to download all the associated files as described here and then need to do some technical work. Please read this guide for the local machine and this for Colab.

1 Like

My strong recommendation is that you use the Coursera Labs environment in your browser to run the assignments.

Running the labs locally brings along another level of complexity which the mentors can’t help with very much (because we can’t see your local environment).

thank you for your recommendation!

1 Like