Solution to Fastai Import Errors in AWS (ubuntu)

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

1 Like

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.

did you remember the source activate fastai?

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

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

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?

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.

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)

That means you’re not using python 3.6

Thanks. Solved my problem !!


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

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