# Building Python 3 support when building from source

**URL:** https://discourse.vtk.org/t/building-python-3-support-when-building-from-source/3236
**Category:** Support
**Created:** [May 7, 2020, 2:09pm UTC](https://discourse.vtk.org/t/building-python-3-support-when-building-from-source/3236 "2020-05-07T14:09:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mshaikh786](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mshaikh786/32/1741_2.png) [@mshaikh786](https://discourse.vtk.org/u/mshaikh786)
#### Post date: [May 7, 2020, 2:09pm UTC](https://discourse.vtk.org/t/building-python-3-support-when-building-from-source/3236/1 "2020-05-07T14:09:03Z")

</div>

Hi,  
I am building VTK 9.0.0 stable release.  
How do I direct CMake to build Python3 binding?  
By default it is building python2.7 bindings.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [May 7, 2020, 3:29pm UTC](https://discourse.vtk.org/t/building-python-3-support-when-building-from-source/3236/2 "2020-05-07T15:29:46Z")

</div>

Pass `-DVTK_PYTHON_VERSION=3` when configuring VTK.

---

<div class="post-metadata">

### Author: ![mshaikh786](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mshaikh786/32/1741_2.png) [@mshaikh786](https://discourse.vtk.org/u/mshaikh786)
#### Post date: [May 7, 2020, 3:35pm UTC](https://discourse.vtk.org/t/building-python-3-support-when-building-from-source/3236/3 "2020-05-07T15:35:29Z")

</div>

Thanks. Works
