# How do I run Python code on ICP?

**URL:** <https://forum.dfinity.org/t/how-do-i-run-python-code-on-icp/3280>\
**Category:** Developers\
**Created:** [May 11, 2021, 8:34pm UTC](https://forum.dfinity.org/t/how-do-i-run-python-code-on-icp/3280 "2021-05-11T20:34:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zkung](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/zkung/32/965_2.png) [@zkung](https://forum.dfinity.org/u/zkung)\
**Post date:** [May 11, 2021, 8:34pm UTC](https://forum.dfinity.org/t/how-do-i-run-python-code-on-icp/3280/1 "2021-05-11T20:34:16Z")

</div>

Are there any relevant documents for reference at present?

---

<div class="post-metadata">

**Author:** ![Ori](https://avatars.discourse-cdn.com/v4/letter/o/ecae2f/32.png) [@Ori](https://forum.dfinity.org/u/Ori)\
**Post date:** [May 11, 2021, 8:54pm UTC](https://forum.dfinity.org/t/how-do-i-run-python-code-on-icp/3280/2 "2021-05-11T20:54:46Z")

</div>

There aren’t at the moment. Broadly, the canisters can run any language that compiles down to WebAssembly (wasm), and Python would need its interpreter bundled with it in the wasm module, there looks like being some progress on this though: [GitHub - appcypher/awesome-wasm-langs: 😎 A curated list of languages that compile directly to or have their VMs in WebAssembly](https://github.com/appcypher/awesome-wasm-langs#python)

---

<div class="post-metadata">

**Author:** ![zkung](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/zkung/32/965_2.png) [@zkung](https://forum.dfinity.org/u/zkung)\
**Post date:** [May 12, 2021, 5:25am UTC](https://forum.dfinity.org/t/how-do-i-run-python-code-on-icp/3280/3 "2021-05-12T05:25:42Z")

</div>

Thank you for your reply.

---

<div class="post-metadata">

**Author:** ![nomeata](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nomeata/32/733_2.png) [@nomeata](https://forum.dfinity.org/u/nomeata)\
**Post date:** [May 12, 2021, 8:38am UTC](https://forum.dfinity.org/t/how-do-i-run-python-code-on-icp/3280/4 "2021-05-12T08:38:00Z")

</div>

It might not be too far out there to create a canister that runs _some_ Python: Using [GitHub - RustPython/RustPython: A Python Interpreter written in Rust](https://github.com/RustPython/RustPython) you can execute Python from Rust, and this compiles to Wasm. So someone could probably write a Python CDK based on that.

(I did some experiments last year, but got distracted.)

---

<div class="post-metadata">

**Author:** ![AVOlight](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/avolight/32/3197_2.png) [@AVOlight](https://forum.dfinity.org/u/AVOlight)\
**Post date:** [June 13, 2023, 1:54am UTC](https://forum.dfinity.org/t/how-do-i-run-python-code-on-icp/3280/5 "2023-06-13T01:54:55Z")

</div>

This would be AWESOME!!! Really hope official support for this is considered 🙏

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [June 14, 2023, 11:50pm UTC](https://forum.dfinity.org/t/how-do-i-run-python-code-on-icp/3280/6 "2023-06-14T23:50:08Z")

</div>

This exists now, Kybra is a Python CDK created by my company Demergent Labs: [GitHub - demergent-labs/kybra: Python CDK for the Internet Computer](https://github.com/demergent-labs/kybra)

---

<div class="post-metadata">

**Author:** ![jsull9](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jsull9/32/19164_2.png) [@jsull9](https://forum.dfinity.org/u/jsull9)\
**Post date:** [November 13, 2024, 2:59am UTC](https://forum.dfinity.org/t/how-do-i-run-python-code-on-icp/3280/7 "2024-11-13T02:59:47Z")

</div>

Sorry for bumping this back up the list. Don’t kill me.

Has Kybra (by Demergent Labs) continued to develop? Are there more solutions to running Python on the IC? How easy is making a simple program like this [GitHub - jsull9/Test-](https://github.com/jsull9/Test-), and turning it into a dapp hosted on the IC…

Not concerned about the graphics/GUI side of things & Turtle isn’t exactly worth my time for this not trying to make it fancy either atm lol I’m just trying to prove it can be done/ do it…

dm me via Discord if easier

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [November 13, 2024, 1:19pm UTC](https://forum.dfinity.org/t/how-do-i-run-python-code-on-icp/3280/8 "2024-11-13T13:19:37Z")

</div>

Kybra is not being developed as rapidly as Azle, it is right now frozen in beta, but it has many of the ICP APIs.

If you would like to build ICP canisters using the ICP APIs, please try Kybra. You must understand that the ICP APIs are what are mostly provided, you can’t expect to pull every package off of PyPI and have it work.

But for pure ICP canister development using the ICP APIs, there is a lot available. If you have issues with the APIs, please let me know.
