# How to build python package from VTK source code?

**URL:** https://discourse.vtk.org/t/how-to-build-python-package-from-vtk-source-code/3345
**Category:** Support
**Created:** [May 20, 2020, 2:41am UTC](https://discourse.vtk.org/t/how-to-build-python-package-from-vtk-source-code/3345 "2020-05-20T02:41:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![caibf](https://discourse.vtk.org/user_avatar/discourse.vtk.org/caibf/32/1607_2.png) [@caibf](https://discourse.vtk.org/u/caibf)
#### Post date: [May 20, 2020, 2:41am UTC](https://discourse.vtk.org/t/how-to-build-python-package-from-vtk-source-code/3345/1 "2020-05-20T02:41:08Z")

</div>

In general, some one would like to use VTK with python through install vtk via pip.

$ pip install vtk

However, I built my VTK binaries from source code and expect to use python interface on it. How can I do that?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [May 20, 2020, 4:20am UTC](https://discourse.vtk.org/t/how-to-build-python-package-from-vtk-source-code/3345/2 "2020-05-20T04:20:37Z")

</div>

Do you need to build VTK because you have made modifications/added your own VTK classes?

---

<div class="post-metadata">

### Author: ![caibf](https://discourse.vtk.org/user_avatar/discourse.vtk.org/caibf/32/1607_2.png) [@caibf](https://discourse.vtk.org/u/caibf)
#### Post date: [May 20, 2020, 4:41am UTC](https://discourse.vtk.org/t/how-to-build-python-package-from-vtk-source-code/3345/3 "2020-05-20T04:41:07Z")

</div>

As I know, the official doesn’t offer pre-built binaries so I need to build the souce code with CMake. But you are right, may be I will add some modifications in the future.

---

<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 20, 2020, 11:00am UTC](https://discourse.vtk.org/t/how-to-build-python-package-from-vtk-source-code/3345/4 "2020-05-20T11:00:42Z")

</div>

The Linux wheels have hit a bump in the road with PyPI hosting (we’re working on it). In the meantime, custom wheel instructions are [here](https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/build.md#python-wheels).
