Import error in Lesson 1

I suspect a git pull may fix this - may also need to reboot.

1 Like

I did git pull but no luck.
I made it work. Downgrading PyTorch to version 0.1.12 from 0.2.0 solved the issue for now.

Thanks Jeremy.

1 Like

I had the same error and this was helpful.
@jeremy - Is using the older version fine or is there a better fix for this?

@sidravi1 I’d need to know more about your setup. Here’s some tips: http://wiki.fast.ai/index.php/How_to_ask_for_Help

Apologies. Here are my details:

  1. Using paperspace fastai image from week 1
  2. All was good until I did a git pull this morning. It gave me an error about missing packages. I installed those and did a conda update to bring everything up to date.
  3. Got error that it couldn’t find “libiomp5.so”. After some googling, I updated my LD_LIBRARY_PATH in to add the path to this lib.
  4. Started getting the ‘dlopen’ error above in the same line as Kumar: “from torch._C import *”. Tried restarting the machine but no love.
  5. Reverted PyTorch version back to 0.1.12 (and any other dependencies that conda found)
  6. Works

Yeah things aren’t working right on Paperspace at the moment. @dillon is investigating!

I wonder if it’s pillow-simd. Try conda update pillow.

pillow is up to date (v3.4.2).
I’m happy to wait for @dillon to finish investigating. In the meantime I’ll use pytorch 0.1.12 - so far it seems to run fine.
Thanks for your help.

1 Like

I’m debugging over in this thread: [Adv] Significant changes to fastai just pushed

Can you see if those steps reproduce the issue for you?

got the same error when I was trying to run in paperspace. You are probably very close :slight_smile:

before any other import insert to your notebook

import torch, cv2

(I’ve been using my notebooks in paperspace in this mode for past 1 week. Please makesure to RESTART your kernel.)

1 Like

Ok. Will try and get back to you.

Sorry mate. I finally tried it and it didn’t work.

I get the “ImportError: dlopen: cannot load any more object with static TLS”

Yes! It works.

Just needed to restart kernel (oops) and your fix works. Thanks!

Hey @JupyterAI,
How did you change the PyTorch version from 0.1.12 to 0.2.0?

I’ve just worked through this problem as well. Using the current fastai git repo and working in AWS.

have posted a series of blogs on this medium account documenting all my config/setup steps.
hopefully will help a future someone. :slight_smile:

I had the same problem, Deb’s solution worked for me.

Using the current fastai git repo and working in AWS.
my blog below documenting all the steps to get lesson1 working from the current git repo.

have posted a series of blogs on this medium account documenting all my config/setup steps.
hopefully will help a future someone. :slight_smile:

yeah Deb it works . Thanks

Thanks Deb it works .

I tried https://medium.com/@GuruAtWork/fast-ai-lesson-1-7fc38e978d37 - and am able to import bcolz using ipython but when I do it using jupyter notebook, it does not work.

I’m using a remote server, and using jupyter notebook from the server using

ssh -N -f -L localhost:8888:localhost:PORT username@ip_address

command.

Error:
ImportError: No module named ‘bcolz’

Okay, so I have solved this. I had to do
conda install nb_convert

Also had to downgrade numpy version, as it was showing this error:

numpy has no attribute __version__

And it worked like charm! Thanks!