Unable to run Python Basics with Numpy Locally

I have downloaded the workspaces.tar.gzaa
Then Unzipped it.So I got this


After clicking on the workspaces file and continuously moving forward I reach to this

After clicking on W2A1 i get this

Now I open python basics with numpy jupyter source file and i get this opened in vs code
Excercise 1 runs well and good as shown below

In building basic sigmoid i get the error that module public tests is not found,similarly I get the errors like name ‘basic_sigmoid’ is not defined,and name ‘sigmoid_test’ is not defined as shown below

Uploading: jup3.png…

So my question is how to get rid of these errors?Do i need to import public_tests.py and test_utils.py in the current jupyter notebook?From where to import?
Please help

So the error says that No Module named public tests.That means this jupyter notebook is not able to access the public_tests.py file
When I open the public _tests.py it shows this


Saying that import test_utils could not be resolved.This means the public_tests.py is unable to access test_utils.py

How to get rid of these?

I can think of two options:

  1. get rid of public_tests

  2. force to import the path of public tests. To do this you can do something like:
    import sys
    sys.path.append(path_to_public_tests)

To download all the files, use “Lab Help” and the “Download al files” link.

1 Like

If I get rid of public_tests then the code having basic sigmoid function definition runs.But then the next block which has basic_sigmoid_test(basic_sigmoid) shows the same error that basic_sigmoid_test is not defined
I guess we can’t eliminate public_tests

I downloaded ALL files.Still EXACTLY the same error persists

So i was able to address the problem.I guess because it was not in the same directory it showed error.I extracted all the files in one folder and the error got resolved

That’s good news.

Although putting all the files in one folder isn’t how the assignment is designed.