Unable to run labs and assignments on PC

Hi, I am facing an issue running the labs on my PC after downloading them. When I run the in VSCode, it gives some errors, mainly in the functions and modules explicitly created for that notebook, for example, to run a particular plot.
In some notebooks, it has worked just fine, but in others, it won’t. I have observed this since course 1. Need some assistance in this regard.
Thanks!

@prateekm_2709,

There are 2 critical steps: (A) download all files related to the lab/assignment. (B) install all packages required by the lab/assignment.

For (A), follow these steps. There is a button for you to download all files.

After (A), try to run the downloaded lab/assignment and see if there is a problem of (B).

You will see “Module Not Found” error when encountering a (B) problem, and in which case, you need to google how to install them in your Python environment. The step to download is different from environment to environment, and I am not familiar with VSCode.

Good luck!
Raymond

1 Like

Thanks, @rmwkwok I downloaded the required package, and now it is running without errors :+1:
One last thing, about all the pre-defined functions that are used in the notebooks, how do we learn to write them in real-world projects?

@prateekm_2709, I would be more than happy to share with you if I know any shortcuts ;), but also as a learner myself, I find the only way is to just do it.

Read the functions you are interested in and is useful in your current work. Apply the function to your work with minimal to medium level of copy from the reference. Medium level is ok, but I would make time to try to modify whatever I copy, either for meeting with my own coding practice or for making it more efficient. If you keep doing this and over some time, you can develop that brain memory and muscle memory to write your own code without even realizing that.

Just keep practicing, and make practicing a part of your work/study life.

Cheers,
Raymond