Running Lab Files in Anaconda Jupyter Notebook

A question for Python and Jupyter Notebook experts.

I am using the Jupyter Notebook in Anaconda installed on my PC. When I upload the lab’s .ipynb files into Jupyter Notebook and run the code cells, I getting errors like

  1. ModuleNotFoundError
  2. NameError

Any advice on resolving these problems would be greatly appreciated.

Thanks in advance.

Examples below

There are two possible sources for that type of error:

  1. It’s not enough just to download the notebook itself (the ipynb file): each notebook has a complete tree of files that accompany it. Here’s a thread about how to download all of the associated files.

  2. There are a lot of packages that need to be installed in your Anaconda environment in order to run the notebooks. There are no official instructions for how to install everything, but here’s a thread with some pointers to get you started down that road.

If you’re going down this road, the issues just never end, so the real point is that you need to develop your own problem solving skills for tackling this type of problem. You can’t just throw up your hands and expect someone else to solve everything for you. The good news is that there is a lot of information out there on StackExchange and many other sites. For example, try googling “no module named ipympl” and see what you get.

Thank you for your suggestions. I did download the lab files with all its associated files and folders structure. I am using the Anaconda Python distribution and not the PyCharm version.

I sought help to get the Lab Files working on Anaconda so I could work on the Course 1 second Lab assignment offline. I am not familiar with how Jupyter Notebook and .ipynb files work together as I have only learnt about them since starting this course, and I only discovered and installed the Anaconda distribution this weekend.

I have over 30 years experience as a software developer, data analyst and business analyst developing and solving business solutions. But given the short time I have to complete the Lab assignment I do not have the time to to research for information on how to setup Anaconda or PyCharm for this upcoming Lab assignment.

I will just have to complete this Lab assignment online and hopefully have Anaconda setup properly for future assignments.

Hello @Danny_Go! If you are interested, check this easy guide for Colab.

Thank you for that link. I have already started the Lab assignment online but I will look into Colab as an option after I have completed the assignment when I have more time to get my head around Jupyter Notebook and .ipynb files.

Don’t worry about the course deadlines, if that’s what you mean by the short time. They are just “advisory” and there is no penalty for missing them. They’ll just ask you if you want to reset them.

If it’s just a matter of convenience, then I suggest you just use the provided online environment. Once you finish the courses and want to continue pursuing your own ML activities, then switching to Colab using Saif’s instructions is a good choice or you can take the time to set up your environment locally using the other instructions provided above.

Thank you. I have completed the Lab assignment online so I now will have the time to look into Colab and Anaconda.


I have finally worked out how to get Anaconda to run the Lab Files on my PC. The instructions are in this .pdf file.

Installing Anaconda on a PC.pdf (363.5 KB)

Hello @Danny_Go! Thanks for sharing such a nice guide. But I would like to highlight one point with this method: you will get errors in some assignments. Because Coursera uses different (old) versions of TensorFlow and libraries than yours (updated versions). To solve this, you have to use the exact same versions that Coursera is using.

Hi @saifkhanengr, thank you for letting me know. I have also setup Colab to run the Lab files. Will Colab have the same problem as for Anaconda. I am using the version of TensorFlow that came with Anaconda and I don’t where or how to obtain an earlier version of it. I am okay with having to do the assignments on the Coursera online but it would be nice to try out different ways off line before having to submit assignments.

Colab uses the latest versions of libraries and frameworks but you can revert to old versions. However, there are many libraries, and downgrading all of them is a tedious task.

Regarding using lab assignments online, on Coursera, after completing the specialization, you will lose access to them soon.