Google Marketplace VM

I created a Vm using marketplace with experimental PyTorch installed that gives me access to fastai library
How can I activate the environment so that I can run jupyter notebooks like it worked on AWS.
It gives me an error no module named ‘bcolz’
This is the same error I got when I had run the notebooks with ‘conda activate fastai’

Please help me through this.

If you use AWS, there is a Fastai VM image, if you use GCP, there is also a VM image.


GCP: []

1 Like

thanks for answering. I have gone through this article. I am using GCP and it is not importing ‘bcolz’ module.

Can you walk me through the steps?
I have my VM setup with Fastai VM image and I have pulled the fastai repo from github
What should I do now to be able to run the course notebooks with all dependencies working?

Hi, I found that the best way is using AWS FasiAi image, for GCP, there are much issues, you can refer this thread. So basically, you have to use virtual env and install the libraries one by one. I don’t know whether there is a better solution.

I have free credit in GCP. So, I want it to work on it.
It was working flawlessly on my computer engine instance but it isn’t on this fastai image in GCP.
I tried the link but they didn’t work.

Try this, I was facing same issue on GCP, AWS, PaperSpace and Azure…

lmk if you still face same issue

Hi, prabhatkrai. I don’t know whether you solved this problem.
After many trials, I found that one way worked for me.
So, you should create a pure GCP VM instance without Fastai image. (Ubuntu 16.04)
And follow this article
Some errors may occur, ignore them!

To run the course’s Notebook, you still need install some libraries manually as suggested in this post using conda or Pip!

It may take some time, by it worked very well for me.

Feel free to ask me if you have any other issues!

1 Like

Thank you for your responses.
I’ll check them out and let you all know!
This has been one of the most active and helpful forums I’ve been part of till now.
I am using conda

The jupyter notebook is showing error. The imports are working now!
I imported them individually on command line by starting python in fastai environment but notebook is not launching.

Hi, I do believe there is something wrong with Jupyter Notebook configuration. Instead of “jupyter notebook”, you should type “jupyter notebook --ip= --no-browser”

Hope this works for you.

I got it to work.
remote access wasn’t allowed.
Thank you! It is working now.
I hope someone works out a way to run the Fastai image VM in GCP marketplace as that will be considerably hasslefree as all libraries are there installed from the start.
Thanks again.

Good to hear that! I hope so, the AWS FastAi with P2 instance cost 0.9$/h.

Anyway, happy learning!

1 Like

@prabhatkrai Please do keep in mind that there is no need to start Jupyter Notebook or Jupyter Lab, it is already running on the GCP VM. The only thing that is need to be done after the creation is to SSH to the instance with port mapping like this:

gcloud compute ssh $INSTANCE_NAME – -L 8080:localhost:8080

This is it, now you can open your browser at localhost:8080 and use fastai. I just have verified on the latest image:

may I ask you to try this? Also, I want to apologize for your inconvenience, may I ask you to give me your mail and I will try to share some GCP credits with you


My email id is
I did the same as written in Medium article on GCP VM.
When I ran this, it wouldn’t import bcolz, cv2 and others.
The rest worked fine. :slight_smile:

Now I see the problem. Here are quick fix and I am going to initiate new build of images that have packages pre-installed. Fix:

  1. log in via SSH to the instance
  2. In the terminal run:

sudo /opt/anaconda3/bin/pip install --force opencv-python
sudo /opt/anaconda3/bin/pip install --force bcolz

you will see something like:

after executing these commands you can use them in the Jupyter Lab:

I tried this and it worked.
Thanks for this and I think it’ll be great to pre-install them as I couldn’t understand how to install these packages in fastai’s environment.
Now I understand how it is working after reading your replies.

Neither of those are necessary for fastai v1 FYI @b0noi . If people are reporting problems here, it suggests they are trying to use fastai 0.7.

I started my VM with Pytorch v1[experimental] and logged in via SSH into it.
After that, I used git pull to get fastai from GitHub for the courses as I am under the impression that other modules and dependencies are already installed on this.
What did I miss?

The courses use an older version of the library. The GCP image is for fastai v1, which is not used in any course yet.