Page 1 of 1

New release of Sense HAT Python library v2.2.0

Posted: Wed Jul 13, 2016 9:43 am
by Davespice
Hi all

We have just done a new release of the Sense HAT python library. Version 2.2.0.
It's planned to go ino the next Raspbian image however, if you want it now, you can install it using pip.

Code: Select all

sudo apt-get remove python-sense-hat python3-sense-hat
sudo pip install sense_hat
sudo pip3 install sense_hat
The main change of note is new the joystick functionality. Previously you would've had to use libraries like pygame and evedev to capture input events, now the Sense HAT library supports the joystick directly with no other dependencies.

Examples here

Please feel free to give it a test and if you find any issues please report them here.
Many thanks

Dave

Re: New release of Sense HAT Python library v2.2.0

Posted: Wed Jul 27, 2016 10:10 am
by bensimmo
Thanks :-)

Makes it a lot easier from my point of view.

Changlog needs a version bump while I'm here
https://github.com/RPi-Distro/python-se ... angelog.md

Re: New release of Sense HAT Python library v2.2.0

Posted: Fri Aug 12, 2016 9:58 pm
by alphanumeric
Nice, I guess, lol. I wanted this way back when I first got my sense hat, it means redoing my code though. I'm currently using evedev. Don't get me wrong, thank you. :D Good things come to those that wait.

Re: New release of Sense HAT Python library v2.2.0

Posted: Tue Aug 23, 2016 8:32 am
by Davespice
Just to let you know the latest version of the API is now in apt. To pull it run the following commands.

Code: Select all

sudo apt-get update
sudo apt-get install python-sense-hat python3-sense-hat -y

Re: New release of Sense HAT Python library v2.2.0

Posted: Sun Dec 04, 2016 5:01 pm
by mastermirko
Hello!
I'm on ubuntu 16.04 on my raspberry pi3, and I did

Code: Select all

sudo apt-get install python-sense-hat python3-sense-hat
and the library was installed fine, with version 2.1, which does not have the new stick interface.
I then tried

Code: Select all

sudo apt-get remove python-sense-hat python3-sense-hat
sudo -H pip install sense_hat
sudo -H pip3 install sense_hat
and it installed the library fine, but the sense hat library could not be imported anymore by python.

I then tried again

Code: Select all

sudo apt-get install python-sense-hat python3-sense-hat
but it was still not possible to import the library in python.

I then tried

Code: Select all

sudo apt-get install sense-hat
from https://pypi.python.org/pypi/sense-hat and it installed fine the library and it is possible to import it, but still no stick interface.

I configured this system brand new last week, so maybe the apt source I'm using does not have the right version of the sensehat library.

How can I handle this?

Thanks!
Mirko

Re: New release of Sense HAT Python library v2.2.0

Posted: Fri Dec 16, 2016 9:58 am
by Davespice
You could try a manual install? I would remove everything first and then start again;

Code: Select all

git clone https://github.com/RPi-Distro/python-sense-hat
cd python-sense-hat
sudo python setup.py install
sudo python3 setup.py install

Re: New release of Sense HAT Python library v2.2.0

Posted: Wed Dec 21, 2016 10:24 pm
by mastermirko
Davespice wrote:You could try a manual install? I would remove everything first and then start again;
Thanks! That worked! Strange that the repos are hold though!

Re: New release of Sense HAT Python library v2.2.0

Posted: Fri Jan 13, 2017 11:28 am
by Dedward5
Hi,

Im really struggling with this (joystick) this tread looks promising but when I try to do the manual install I get the message

ImportError: No module named setuptools

Ps im doing the manual install because the usual install method does not seem to give me the sense stick module.

Thanks,

Re: New release of Sense HAT Python library v2.2.0

Posted: Fri Jan 13, 2017 12:37 pm
by DougieLawson
sudo apt-get install python{,3}-setuptools