Lesson 2 import failures

Hi. I get import errors on bcolz so I did this:

conda install bcolz

but still get this

ModuleNotFoundError: No module named 'isoweek'

and install isoweek doesn’t help.

nevermind. forgot source activate fastai. damnit!

I got a similar issue about bcolz.popall then needed to downgrade matplotlib

I have import issues in lesson 1. I have activated my source that includes anaconda, it uses python 3.6, and I have conda env updated in the fastai directory after git pulling. Any ideas?

you did source activate fastai, right? It should say (fastai) on your prompt.

You can also just use crestle.com, which has already got the stuff installed.

Yes. I will try some more things and let you know if I can’t fix it, thanks!

I also have import error below
ImportError: No module named cv2

Tried git pull and conda env update. It still shows error.

Have you figured it out? Thanks!

did git pull from fastai dir successfully finish or did you get an error? Did you restart jupyter notebooks? did you source activate fastai?

Yup. I tried all of these.

git pull from fastai is fine. No error.

Maybe come to my office at 3:05

Here is the steps to fix my import error:

  1. git pull (fastai dir)
  2. conda env update
  3. source activate fastai
  4. start jupyter notebook

Make sure to have (fastai) on the prompt before starting jupyter notebook, otherwise it will have import error.


Nice! I realized I was trying to use my local environment, which I hadn’t set up properly. AWS was working. So I reinstalled the environment locally and now everything works everywhere! Thanks!

1 Like

I still get the same error. I did all first three steps, but when I ran the code I still got the error. I didnt understand what do you mean ‘have fastai on the promp’, do you mean to open Jupyter notebook in that directory?

Hi Davi, I feel like I messed up the local environment too. Can you please tell me how to reinstall the environment?

I used conda remove --name fastai --all and then started the process from scratch:

conda create -n fastai python=3.6 anaconda
(then move to fastai directory)
conda env update

This page has all the details about managing the environments, from creating to removing, if you want some more details: https://conda.io/docs/user-guide/tasks/manage-environments.html#removing-an-environment

1 Like

Thanks! I will try this.
BTW do we have any documents about how to set up the environment from scratch for our class? I can’t find it.

Also when people are saying they see fastai on the terminal prompt they mean this:

versus this:

It happens once you have activated that environment using source activate fastai

1 Like

The environment should be fully set up with just the couple steps I wrote above. Did you mean something else?

have fastai on the promp means to use the code below:

you will see the difference from Davi’s screenshots


I will try the steps first and see what happens! Thanks!