# Python module not found in Node Code

**URL:** <https://community.n8n.io/t/python-module-not-found-in-node-code/28695>\
**Category:** Questions\
**Tags:** node\
**Created:** [July 28, 2023, 3:04am UTC](https://community.n8n.io/t/python-module-not-found-in-node-code/28695 "2023-07-28T03:04:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hoang\_Vu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/hoang_vu/32/27780_2.png) [@Hoang\_Vu](https://community.n8n.io/u/Hoang_Vu)\
**Post date:** [July 28, 2023, 3:04am UTC](https://community.n8n.io/t/python-module-not-found-in-node-code/28695/1 "2023-07-28T03:04:36Z")

</div>

## I read this 1 article [Python Support and Release Versions](http://community.n8n.io/t/python-support-and-release-versions/26291) but why when i deploy it doesn’t have that feature

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/a/9/a9b787061257f689b67ed1a21c85f59af3f608fb.png)

## Information n8n setup

- **n8n version: 1.0.5**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via Docker**
- **Operating system:Ubuntu**

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [July 28, 2023, 6:26am UTC](https://community.n8n.io/t/python-module-not-found-in-node-code/28695/3 "2023-07-28T06:26:27Z")

</div>

Welcome to the community @Hoang_Vu !

Not sure I understand. The screenshot you posted shows the Python option.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [July 28, 2023, 6:38am UTC](https://community.n8n.io/t/python-module-not-found-in-node-code/28695/4 "2023-07-28T06:38:41Z")

</div>

Hey @Hoang_Vu,

In the 1.0 release we made a change so that it automatically imports the module if you include it in an imports in your code.

You can find the list of supported here: [Packages built in Pyodide — Version 0.23.4](https://pyodide.org/en/stable/usage/packages-in-pyodide.html#packages-in-pyodide)

---

<div class="post-metadata">

**Author:** ![Hoang\_Vu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/hoang_vu/32/27780_2.png) [@Hoang\_Vu](https://community.n8n.io/u/Hoang_Vu)\
**Post date:** [July 28, 2023, 8:14am UTC](https://community.n8n.io/t/python-module-not-found-in-node-code/28695/5 "2023-07-28T08:14:49Z")

</div>

Here is an example module not included in pyodide

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/6/b/6ba7b4c3cc62b5ec3bd0656e0ce9a556dad549d0.png)

---

<div class="post-metadata">

**Author:** ![Hoang\_Vu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/hoang_vu/32/27780_2.png) [@Hoang\_Vu](https://community.n8n.io/u/Hoang_Vu)\
**Post date:** [July 28, 2023, 8:16am UTC](https://community.n8n.io/t/python-module-not-found-in-node-code/28695/6 "2023-07-28T08:16:41Z")

</div>

Hi @jan  
This is a picture from an article i attached above and i see there is support for declaring modules for python.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/e/c/ecc06a9ee3fd72fad7d2b3acb5053cdab4e132a6.png)

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [July 28, 2023, 8:20am UTC](https://community.n8n.io/t/python-module-not-found-in-node-code/28695/7 "2023-07-28T08:20:59Z")

</div>

Hey @Hoang_Vu,

We removed the python modules field as they are now imported automatically if they are supported, You can find the support list here: [Packages built in Pyodide — Version 0.23.4](https://pyodide.org/en/stable/usage/packages-in-pyodide.html#packages-in-pyodide)

Request is not on the supported list so I would expect that to fail.

---

<div class="post-metadata">

**Author:** ![Hoang\_Vu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/hoang_vu/32/27780_2.png) [@Hoang\_Vu](https://community.n8n.io/u/Hoang_Vu)\
**Post date:** [July 28, 2023, 8:44am UTC](https://community.n8n.io/t/python-module-not-found-in-node-code/28695/8 "2023-07-28T08:44:46Z")

</div>

Hi @Jon ,  
It’s a bit inconvenient when Pyodide only supports a few modules

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [July 28, 2023, 9:49am UTC](https://community.n8n.io/t/python-module-not-found-in-node-code/28695/9 "2023-07-28T09:49:17Z")

</div>

Hey @Hoang_Vu,

Even with the previous Python Modules field it would only pull in what Pyodide supports so the functionality itself has not really changed.

We use Pyodide because it sandboxes the code and protects the instance, While this may not be ideal for everyone it does allow python to be used and you were after any specific modules you could ask the maintainer of the module to support pyodide.

Alternatively if you didn’t care about the python sandbox you could build your own docker image that includes python and the modules you want to use then use them from the execute command node.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [October 26, 2023, 9:49am UTC](https://community.n8n.io/t/python-module-not-found-in-node-code/28695/10 "2023-10-26T09:49:44Z")

</div>

Closed on October 26, 2023, 9:49am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
