Solution to Fastai Import Errors in AWS (ubuntu)


(Jose A. Rodilla) #1

I was getting the following error when trying to import from fastai.imports in my AWS machine:

In case anyone is having a similar issue, the following installs solved the problem for me:

sudo apt-get install libsm6 libxrender1 libfontconfig1

sudo apt install libgl1-mesa-glx


(Yiqiang Zhao) #2

I’m having the same issue.
Why is this happening? I didn’t have this issue before.
I git clone in this morning. Is this because something changed to the repo recently?

If the above solution doesn’t work,
try our TA’s.


(parrt) #3

did you remember the source activate fastai?


(Yiqiang Zhao) #4

Yes. But it still gave me this error.
Maybe I did something wrong in somewhere else…


(Jeremy Howard (Admin)) #6

Congrats on solving it - and thanks so much for sharing!


(Prince Grover) #7

Help help –
I want to use fastai library on a different environment. So, ‘fastai’ that appears on left side of terminal after activating, I don’t want that, but still I want to use fastai functions. Can I do that too?


(Jeremy Howard (Admin)) #8

Sure. You’ll need to install all the libs in environment.yml , then you’ll just need to copy or symlink the fastai folder to wherever your code is.


(Prince Grover) #9

So, I tried using fastai library in a different environment, but still facing issues.
Things I tried –
• Installed all requirements of fastai from requirements.txt
• Copied fastai to folder where my code is (imports not working by this)
• sys.path.append(“fastai_path”) in code. (getting shared errors)


(Jeremy Howard (Admin)) #10

That means you’re not using python 3.6


(chengcheng xu) #11

Thanks. Solved my problem !!


(Arijit Deb) #12


Hi,
I am getting the fastai import errors in AWS(windows m4.xlarge). Please suggest how to resolve the same in windows.


(Chiranjeevi) #13

Thanks for the instructions. It helped me solve same problem I had on Windows->Ubuntu installation