Clearly I have something missing - I was up and running on my first instance, but created a 2nd one that was non-pre-emptive and now I get
ImportErrorTraceback (most recent call last)
in ()
----> 1 from fastai.vision import *
2 from fastai.metrics import error_rate
ImportError: No module named fastai.vision
from fastai.vision import *
from fastai.metrics import error_rate
running on a mac
I followed all these steps with no luck:
I used these steps, and error got resolved for me:
Open terminal
Navigate to anaconda3 cd anaconda3
update conda conda update conda
Navigate to conda env section and create new environment named fastai cd envs conda create --name fastai
make fastai environment as current working directory cd fastai
clone github repository of course-v3 git clone https://github.com/fastai/course-v3.git
make course-v3 as current working dir cd course-v3
open jupyter notebook jupyter notebook
Click New->Terminal in Jupyter, then type: conda install -c fastai fastai
this step will install all required libraries.
calling it a night…been fighting this since Saturday and no luck…I am not a programmer so I am sure that doesn’t help with my understanding of where things are but still frustrated that I haven’t figured it out - thanks for your help!
If that all worked go ahead and lauch jupyter and run from fastai.vision import *. Remember to activate your fastai environment each time before launching jupyter
Actually, you need to do more than this as I’m assuming your trying to use GCP to host your notebooks and execute them. The problem is the ssh doesn’t activate your conda environment, and you can’t do it subsequently.
Follow the instructions here under section “Executing Jupyter remotely with Conda Environment” to fix this. If your screen matches the screenshots then you’ll know your error lies elsewhere.
Note: I put this together for fastaiv2 but it should work for you by simply writing fastai instead of fastai2 where appropriate.
Thanks for your help - I haven’t been able to work on this - but am at it again - I went through all these suggestions but am still at the same place - attached is what I get in my notebook -