Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python version #1

Open
guysqr opened this issue Jul 20, 2019 · 1 comment
Open

Python version #1

guysqr opened this issue Jul 20, 2019 · 1 comment

Comments

@guysqr
Copy link

guysqr commented Jul 20, 2019

Hi there, thanks for this guide. I've installed python 3.7 following your instructions but on my Pi python 2.7 is the default and 3.4 is also installed and usable as /usr/bin/python3. Is there a reason for requiring 3.7? The default script that the node-red sensehat plugin invokes specifies python 2.7 because it invokes it via

COMMAND=/usr/bin/python -u /home/pi/.node-red/node_modules/node-red-node-pi-sense-hat/sensehat.py

I have tried changing my default python version (using this guide https://raspberry-valley.azurewebsites.net/Python-Default-Version/) and that lets the script run under default python 3.4, which works but doesn't seem to perform any differently to python 2.7.

I was hoping that switching to python3 would address the issues I am seeing with the sense-hat stopping streaming data when I move it - it seems like the movement causes it to choke and only once the movement stops does the sense-hat blurt out the change events. Any ideas? Is python 3.7 going to address that issue? Or am I wasting my time upgrading my Pi to use it and I'll still be at square one?

Thanks again

@mpolinowski
Copy link
Owner

hey @guysqr,

tbh I did not spend much time thinking about the Python version - I had to reset my Pi (v3) and picked the new Buster minimal image from Raspbian for it - just to give it a try. The SenseHAT Node names python v3.2, so I decided to try v3.7 instead and it worked right away.

I am not using the motion sensors myself - but I tested it just now and they are updating when I move the Pi. Actually, without smoothing those values, they keep fluctuating all the time:

SenseHAT

But if the problem is related to your Python version, I can't say. But since there is a mention for version 3.2 in the official docs I don't assume that updating to v3.7 will solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants