Google Cloud Datalab installation

Hello all,

I would like to start the course and execute it on Google Cloud Datalab notebook.

I was able to run:
!pip install fastai
import fastai
from fastai.vision import * # fires an error

ImportErrorTraceback (most recent call last) <ipython-input-14-c0e76450f370> in <module>() ----> 1 from fastai.vision import * ImportError: No module named vision

what am I missing? any additional installation?

Many thanks,
eilalan

1 Like

When I run mine, I do

!pip install fastai --upgrade
from fastai import *
from fastai.vision import *

The upgrade is to ensure I have the most recent version

1 Like

Thanks. it didnt work for me.
Are you working with python 2 or 3?

Thanks
eilalan

I am working in python 3

might be the issue. will update soon

nope.
ImportError: No module named ‘fastai.vision’
any other idea?

Can I see your import code?

from fastai.vision import *

I tried also

!pip install torch --upgrade

  • reset the machine

import torch
print(torch.version)

1.0.0

still doesn’t work

Before you did
from fastai.vision import *
did you include
from fastai import * ?

When I do it it makes me include regular fastai first

did u install torchvision? @eilalan

yes. included:

!pip install fastai --upgrade
from fastai import *
from fastai.vision import *

installing torchvision now

import torchvision
print(torchvision.version)

0.2.1

It sill doesnt work.

adding

!pip freeze

absl-py==0.6.1
alembic==0.8.10
apache-airflow==1.9.0
appdirs==1.4.3
asn1crypto==0.24.0
astor==0.7.1
attrs==18.2.0
Automat==0.7.0
backcall==0.1.0
bcolz==1.2.1
beautifulsoup4==4.7.1
bleach==2.1.2
blinker==1.4
bokeh==0.13.0
brewer2mpl==1.4.1
bs4==0.0.1
cachetools==2.1.0
certifi==2018.8.24
cffi==1.11.5
chardet==3.0.4
click==6.7
cloudpickle==0.5.5
configparser==3.5.0
constantly==15.1.0
crcmod==1.7
croniter==0.3.26
cryptography==2.3.1
cycler==0.10.0
cytoolz==0.9.0.1
dask==0.17.1
datalab==1.1.3
decorator==4.3.0
descartes==1.1.0
dill==0.2.6
distributed==1.21.8
docutils==0.14
entrypoints==0.2.3
fastai==0.7.0
fastcache==1.0.2
feather-format==0.4.0
Flask==0.11.1
Flask-Admin==1.4.1
Flask-Cache==0.13.1
Flask-Login==0.2.11
flask-swagger==0.2.13
Flask-WTF==0.14
funcsigs==1.0.0
future==0.16.0
futures==3.0.3
gast==0.2.2
ggplot==0.6.8
gitdb2==2.0.5
GitPython==2.1.11
google-api-core==0.1.4
google-api-python-client==1.6.2
google-auth==1.6.2
google-auth-httplib2==0.0.3
google-auth-oauthlib==0.1.0
google-cloud-bigquery==1.8.1
google-cloud-core==0.28.1
google-cloud-monitoring==0.28.0
google-resumable-media==0.3.2
googleapis-common-protos==1.5.5
graphviz==0.10.1
grpcio==1.17.1
gunicorn==19.9.0
h5py==2.7.1
heapdict==1.0.0
html5lib==1.0.1
httplib2==0.10.3
hyperlink==18.0.0
idna==2.6
imageio==2.4.1
incremental==17.5.0
ipykernel==4.8.2
ipython==6.5.0
ipython-genutils==0.2.0
ipywidgets==7.2.1
isoweek==1.3.3
itsdangerous==1.1.0
jedi==0.12.1
Jinja2==2.8
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==6.0.0
jupyter-core==4.4.0
jupyter-highlight-selected-word==0.2.0
lime==0.1.1.23
locket==0.2.0
lockfile==0.12.2
lxml==3.8.0
Mako==1.0.7
Markdown==2.6.11
MarkupSafe==1.0
matplotlib==2.1.2
mistune==0.8.3
mizani==0.5.3
mltoolbox-datalab-classification-and-regression==1.0.1
mltoolbox-datalab-image-classification==0.2
mock==2.0.0
msgpack==0.5.6
nbconvert==5.3.1
nbformat==4.4.0
networkx==2.1
nltk==3.2.1
notebook==5.6.0
numpy==1.14.0
oauth2client==2.2.0
oauthlib==2.1.0
olefile==0.46
opencv-python==4.0.0.21
ordereddict==1.1
packaging==17.1
palettable==3.1.1
pandas==0.22.0
pandas-gbq==0.3.0
pandas-profiling==1.4.1
pandas-summary==0.0.6
pandocfilters==1.4.2
parso==0.3.1
partd==0.3.8
patsy==0.5.0
pbr==4.2.0
pexpect==4.6.0
pickleshare==0.7.4
Pillow==5.4.1
plotly==1.12.5
plotnine==0.5.1
prometheus-client==0.3.1
prompt-toolkit==1.0.15
protobuf==3.6.1
psutil==4.3.0
ptyprocess==0.6.0
pyarrow==0.12.0
pyasn1==0.4.4
pyasn1-modules==0.2.2
pycparser==2.19
Pygments==2.1.3
PyJWT==1.6.4
pyOpenSSL==18.0.0
pyparsing==2.2.1
PySocks==1.6.8
python-daemon==2.1.2
python-dateutil==2.5.0
python-editor==1.0.3
python-nvd3==0.14.2
python-slugify==1.1.4
python-snappy==0.5.1
pytz==2018.4
PyWavelets==1.0.0
PyYAML==3.13
pyzmq==17.1.0
qtconsole==4.4.3
requests==2.18.4
requests-oauthlib==0.8.0
rsa==3.4.2
scikit-image==0.13.0
scikit-learn==0.19.1
scipy==1.0.0
seaborn==0.7.0
Send2Trash==1.5.0
service-identity==17.0.0
setproctitle==1.1.10
simplegeneric==0.8.1
simplejson==3.16.0
six==1.10.0
sklearn-pandas==1.8.0
smmap2==2.0.5
sortedcontainers==2.0.5
soupsieve==1.7.1
SQLAlchemy==1.2.16
statsmodels==0.8.0
sympy==0.7.6.1
tabulate==0.7.7
tblib==1.3.2
tensorboard==1.8.0
tensorflow==1.8.0
termcolor==1.1.0
terminado==0.8.1
testpath==0.3.1
thrift==0.11.0
toolz==0.9.0
torch==1.0.0
torchtext==0.3.1
torchvision==0.2.1
tornado==4.5.1
tqdm==4.30.0
traitlets==4.3.2
Twisted==18.7.0
Unidecode==1.0.23
uritemplate==3.0.0
urllib3==1.22
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.14.1
widgetsnbextension==3.2.1
WTForms==2.2.1
xgboost==0.6a2
zict==0.1.3
zope.deprecation==4.4.0
zope.interface==4.5.0

thanks so much,
eilalan

Hi all. Has there been a fix figured out for this? I am also using Google Cloud Datalab and running into the same error.

1 Like