# When running Python scripts, how to you set which version of Python is being used?

**URL:** https://discourse.nodered.org/t/when-running-python-scripts-how-to-you-set-which-version-of-python-is-being-used/30810
**Category:** General
**Created:** [28 July 2020 03:28 UTC](https://discourse.nodered.org/t/when-running-python-scripts-how-to-you-set-which-version-of-python-is-being-used/30810 "2020-07-28T03:28:58Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)
#### Post date: [28 July 2020 09:10 UTC](https://discourse.nodered.org/t/when-running-python-scripts-how-to-you-set-which-version-of-python-is-being-used/30810/4 "2020-07-28T09:10:54Z")

</div>

Turns out it is hardcoded for this node.

> <https://github.com/erfanjahanshahlo/node-red-contrib-pifacecad/blob/8457ae3afbcb844e80a3d3cf8d5df5bca698f398/pfc_lcd.js#L8>

This line tells you it will use Python 2.x, likely 2.7 which has been End Of Life since January 1st.

As such, the instructions for installing dependencies are odd:

> [@](#):
>
> For install dependencies, in your raspberry pi terminal run the below command.
> 
> ```auto
> sudo apt-get update
> sudo apt-get upgrade
> sudo apt-get install python{,3}-pifacecad
> 
> ```

That last line will install the pifacecad python library for both python2 and python3, yet hardcoded uses python2.

---

_[View the full topic](https://discourse.nodered.org/t/when-running-python-scripts-how-to-you-set-which-version-of-python-is-being-used/30810)._
