Skip to content
Demonstrating how to activate a python 2 environment with `runtime.txt`
Branch: master
Clone or download
Latest commit d8e1479 Dec 15, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.

Specifying a Python 2 environment with runtime.txt


We can specify various runtime parameters with a runtime.txt file. In this repository, we demonstrate how to install python 2 with the environment.

If you specify python-2.7 in runtime.txt, then:

  • A python3 environment is created & installed (this is what the notebook runs from)
  • A python2 environment is created and registered
  • The contents of requirements.txt are installed into the python2 environment

important: Make sure that you save your notebooks with a python 2 kernel activated, as this defines which kernel Binder will use when a notebook is opened.

note: If you also wish to install python 3 dependencies, you may do so by including a file called requirements3.txt. The packages inside will be installed into the python 3 environment.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.