ImportError with `load_data`

Hey all,
I tired to run the line:
from utils import load_data

but keep getting the error saying:
ImportError: cannot import name ‘load_data’ from ‘utils’

I checked that ‘utils’ has been successfully installed on my laptop. Has anyone faced similar issue? Any suggestions?

Thanks,
Susanna

Hi @SusannaQ,

From what I’m understanding, you are trying to run this locally on your own laptop ?

And the you say, “utils” is installed on your laptop, do you mean you have downloaded the utils.py file or used the “utils” python package ?

Cheers,
Mubsi

Hi Mubsi,

Thanks for your reply! I didn’t download the utils.py file. I just put the command “pip install utils” in the terminal. Are there any additional steps I missed?

Susanna

Hi @SusannaQ,

The “utils” used for assignments are not the python package utils, but the files utils.py.

In order to run the assignments locally, you have to download the entire workspace, including the helper files such as the utils.py.

Open the assignment, go to File ---> Open.... When the workspace opens, click on “Lab Files” on the top right corner. You will be able to download everything from there.

Cheers,
Mubsi

Thanks a ton! Problem solved.