# Node-red python function

**URL:** <https://discourse.nodered.org/t/node-red-python-function/73924>\
**Category:** General\
**Tags:** python\
**Created:** [19 January 2023 15:25 UTC](https://discourse.nodered.org/t/node-red-python-function/73924 "2023-01-19T15:25:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![superlogan72](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/superlogan72/32/74680_2.png) [@superlogan72](https://discourse.nodered.org/u/superlogan72)\
**Post date:** [19 January 2023 15:25 UTC](https://discourse.nodered.org/t/node-red-python-function/73924/1 "2023-01-19T15:25:30Z")

</div>

Hello  
I have a problem but i'm unable to find the solution.  
Using the python function i do  
from pigpio\_encoder.rotary import Rotary  
But i get the error : no module named pigpio\_encoder,  
I have this module if i import it from python shell i have no problem to run it  
sorry for my stupid question but it's the first time that i use node red  
Regards

---

<div class="post-metadata">

**Author:** ![superlogan72](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/superlogan72/32/74680_2.png) [@superlogan72](https://discourse.nodered.org/u/superlogan72)\
**Post date:** [19 January 2023 16:12 UTC](https://discourse.nodered.org/t/node-red-python-function/73924/2 "2023-01-19T16:12:35Z")

</div>

Hello i have solved doing this:  
import sys  
sys.path.append("path\_to\_my\_lib")  
Regards Luca

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 February 2023 16:13 UTC](https://discourse.nodered.org/t/node-red-python-function/73924/3 "2023-02-02T16:13:27Z")

</div>

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