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

Forgetting pythonshell, nodes seem to have (or be able to have) python code in them.

How do I know which version of python they invoke?

To check
image

AFAICS, (as far as I can see) there is no mention of python being used.

(Just checked.) NO.

No mention.

Now I can't even find the node in the library.

This one.

Turns out it is hardcoded for this node.

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:

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

1 Like

Thanks.

So 2.7 should be it.

I shall stick to trying the code with that then.

@Trying_to_learn - I would open an issue on GitHub pointing out the hard coded version and that it hit EOL

3 Likes

To repeat what Lena said - Python 2.x is end of life and will no longer get updates. You really do need to upgrade.

Good spot Lena.

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