I am using Python3 for my projects. However, the Google Cloud Datalab runs with Python2.7.x by default. How do I change to Python3?
Asked
Active
Viewed 1,025 times
2 Answers
3
Datalab only supports Python 2 for now unfortunately.
One thing you can try is install the Pydatalab lib, which is a Jupyter extension that adds support for a number of Google Cloud Platform services to your Jupyter notebooks. That library supports Python 3.

yelsayed
- 5,236
- 3
- 27
- 38
-
I see that Datalab now has Python3 support. However, when I install a package such as ```!pip install bson``` it only installs for python 2. How can I change the environment to python3 for a notebook? – Jas Oct 17 '17 at 20:48
1
It looks like that they support Python 3 now: https://github.com/googledatalab/datalab/issues/902 .

vochicong
- 51
- 4
-
Actually, I've customized Datalab image to enable Python3 and add some libraries. See https://hub.docker.com/r/vochicong/datalab-nlp/ and https://github.com/vochicong/datalab-nlp! – vochicong Jun 18 '17 at 23:26