NameError: name 'os' is not defined

Hello,

I’m trying to run the first lesson on jupyter, but can’t seem to get past this error:

It says "NameError: name ‘os’ is not defined

I’m using an Ubuntu 16 VM on GCP to connect to jupyter. I’ve pulled fast.ai 0.7 git and also done conda env update, but none seemed to help.

I’ve also run each cell before it, but this still hasn’t fixed the problem

UPDATE:

Here’s what it says now, after I made sure to run each cell before it:

I’ve tried to find the directory on my VM terminal, but it can’t seem to find it

It seems that my dogscats file isn’t under data, does anyone know how to fix this?

error123

SOLUTION**:

I feel quiet silly. Turns out that I had to create a new data file and unzip the data from dogscats.zip and move it into the data file.

Here’s the code I wrote into my prompt:

$ wget http://files.fast.ai/data/dogscats.zip
$ unzip dogscats.zip
$ mkdir data
$ mv dogscats data

Got this from @isaacguerreiro in this post:

Hope this helps anyone who comes across this problem!

2 Likes