ImportError: cannot import name 'FileUpload'


During the lesson 2/3 material I encountered the ImportError below.
I updated Paperspace environment with:
pip install fastai2 fastcore --upgrade

ImportError                               Traceback (most recent call last)
<ipython-input-2-87c13fad68c4> in <module>
      1 #hide
      2 from utils import *
----> 3 from import *

/opt/conda/envs/fastai/lib/python3.6/site-packages/fastai2/vision/ in <module>
      8 from import *
      9 from .core import *
---> 10 from ipywidgets import HBox,VBox,widgets,Button,Checkbox,Dropdown,Layout,Box,Output,Label,FileUpload
     12 # Cell

ImportError: cannot import name 'FileUpload'

Based on StackOverflow it seems to be due to circular dependent imports. Should I import FileUpload directly or should the order of imports be adjusted for example?
Any suggestions on how to solve this?

EDIT: I create a new Paperspace Notebook and duplicated the same lesson 2/3 Jupyter Notebook. Now it works :slight_smile: Probably had to do with the container (?)

Did you ever get an answer to this?

Can you try doing this before:

!pip install git+ 
!pip install git+


from utils import *
from import *
from fastai2.torch_basics import *
#Data Augmentation
from nbdev.showdoc import *

I am not having that error at the moment

Well, I don’t know the technical issue, but as mentioned I created a new container for Paperspace (the environment I use). This solved the problem. Probably had to do with software update.

1 Like