# How To Specify Version of Python in Binder/Notebook?

**URL:** <https://discourse.jupyter.org/t/how-to-specify-version-of-python-in-binder-notebook/9385>\
**Category:** Binder\
**Created:** [May 30, 2021, 6:25am UTC](https://discourse.jupyter.org/t/how-to-specify-version-of-python-in-binder-notebook/9385 "2021-05-30T06:25:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![radiantone](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@radiantone](https://discourse.jupyter.org/u/radiantone)\
**Post date:** [May 30, 2021, 6:25am UTC](https://discourse.jupyter.org/t/how-to-specify-version-of-python-in-binder-notebook/9385/1 "2021-05-30T06:25:25Z")

</div>

Hi, how do I ensure that my binder/notebook uses a specific version of python? e.g. 3.8?

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [May 31, 2021, 6:00pm UTC](https://discourse.jupyter.org/t/how-to-specify-version-of-python-in-binder-notebook/9385/2 "2021-05-31T18:00:58Z")

</div>

One option is to use conda to specify version. An example on using conda for binder is here: [Sample Binder Repositories — Binder 0.1b documentation](https://mybinder.readthedocs.io/en/latest/examples/sample_repos.html#conda-environment-with-environment-yml) - just modify the `environment.yml` file to include `- python>=3.5` pin or (similar).

---

<div class="post-metadata">

**Author:** ![sgibson91](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/sgibson91/32/487_2.png) [@sgibson91](https://discourse.jupyter.org/u/sgibson91)\
**Post date:** [May 31, 2021, 7:53pm UTC](https://discourse.jupyter.org/t/how-to-specify-version-of-python-in-binder-notebook/9385/3 "2021-05-31T19:53:43Z")

</div>

The other option is to use a `runtime.txt` as documented here [Configuration Files — Binder 0.1b documentation](https://mybinder.readthedocs.io/en/latest/using/config_files.html#runtime-txt-specifying-runtimes)
