pimoroni / blinkt

Python Library for Blinkt; 8 APA102 LEDs for your Raspberry Pi
https://shop.pimoroni.com/products/blinkt
MIT License
314 stars 103 forks source link

Issues with git clone and setup.py #81

Closed metadiablo-glyph closed 4 years ago

metadiablo-glyph commented 4 years ago

Had issues with cpu_load.py, solved with sudo apt install python3-psutil contrary to "sudo pip install psutil" Same issue with candle.py and likely others as well. I have not gone over all of them. PR #82-84 resolve this (my specific) issue and make installation a bit more hassle free. Perhaps include sudo apt install python3-blinkt python3-psutil python3-numpy as a quick and easy install to satisfy error requirements for these scripts. (Again, I have not gone through all of the example scripts, just the ones mentioned.)

Additional issue

After cloning this repo, I am having issues running the setup.py script.

pi@raspberrypi:~/blinkt/library $ sudo python3 setup.py install
Traceback (most recent call last):
  File "setup.py", line 26, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 28, in <module>
    from distutils.core import setup
ModuleNotFoundError: No module named 'distutils.core'

Likely fixable by installing said modules in pip, however that should be more apparent in the instructions in the readme.

Notes:

Raspberry Pi Zero W v1.1

pi@raspberrypi:~/blinkt/library $ uname -a
Linux raspberrypi 4.19.97+ #1294 Thu Jan 30 13:10:54 GMT 2020 armv6l GNU/Linux
druck13 commented 4 years ago

On 12 Apr 2020 Glyph notifications@github.com wrote:


pi@raspberrypi:~ $ sudo python3 cpu_load.py
This script requires the psutil module
Install with: sudo pip install psutil
pi@raspberrypi:~ $ sudo pip install psutil
sudo: pip: command not found

Try pip3 rather than pip, as pip is for python 2.

Otherwise do a: sudo apt install python3-pip

I imagine this is not intended functionality. It would be much friendlier to have it all work out of the box. (or have instructions to allow this to be easier)

Before releasing any software it a good idea to try it on a completely fresh install of the OS. Its very easy to forget the things that you always install yourself, but other might not have. It's also something I forget to do on a regular basis.

Cheers ---David

--


David J. Ruck Phone: +44- (0)7974 108301 Email: druck@druck.org.uk


metadiablo-glyph commented 4 years ago

pip3 returns the same error as I don't have pip/pip3 installed on a fresh Raspbian image. These tests were done on a completely fresh install of Raspbian Buster Lite, with update/dist-upgrade, however this is definitely sage advice!

There are no instructions that layout install instructions for pip/pip3 in the readme, of course with sudo apt install python3-pip this changes. The readme for a manual install (which is of course required on Lite images), simply says to use sudo apt-get install python3-blinkt Which alone does not solve the issues of three problems, the first being the examples dependencies are not met, the second is that for the uninitiated the pip/pip3 install is not very obvious, and finally the Development install instructions do not work as stated.

Customers who purchased this hardware may find it rather frustrating having to go through hoops to still use it, and those buying these things aren't likely very experienced with Raspbian in general. Leaving a bad taste for folks trying to get into "making" after buying products from Pimoroni. On the other hand, there is a 30-day money-back guarantee and I imagine if it was an issue, Pimoroni would have addressed this issue.

RogueM commented 4 years ago

I recommend you use the pimoroni-dashboard (sudo apt-get install pimoroni) or the dedicated script for the blinkt as they take care of the necessary dependencies, not just for the library, but the examples. It does not mean they will go a perfect job on Buster but they will definitely get you further than a manual install, if you are unsure how to proceed.

RogueM commented 4 years ago

the dedicated script is mentioned here: https://learn.pimoroni.com/tutorial/tanya/beginning-with-blinkt

... but again, I recommend using the pimoroni-dashboard, which is just a 'smart' frontend for these scripts. Note that Buster has changed a few things so install should come with a health hazard, and may require some additional massaging.

RogueM commented 4 years ago

one thing I will say on Buster Lite though, is that you may need to run the following manually first: sudo apt-get raspi-gpio install (EDIT: actually it is not required to be done manually, my test SD was too small for that to happen smoothly via the script on first try).

but other than that the instructions set out on the front page works as advertised as far as I can tell. Development section is obviously for advanced users and require additional knowledge. It is NOT required on Raspbian Lite, the curl | bash method will work just fine.

metadiablo-glyph commented 4 years ago

Full install (recommended):

We've created an easy installation script that will install all pre-requisites and get your Blinkt! up and running with minimal efforts. To run it, fire up Terminal which you'll find in Menu -> Accessories -> Terminal on your Raspberry Pi desktop, as illustrated below:

This leads me to believe it only works with "Raspbian with Desktop". I am certainly no expert but it's misinterpretable. I thought the curl | bash method only applied to folks with Raspbian w/ Desktop as I felt it was a pretty big "context clue" given the big screenshot and following text. High chance to misconstrue in my opinion.

Gadgetoid commented 4 years ago

Our Python boilerplate seeks to fix from-GitHub install issues with Raspbian Lite (road tested with Enviro+), but those improvements have yet to be backported to Blinkt!

I have a process document for revisiting our old software libraries - bear in mind this one is 3-4 years old now - and Blinkt! will get its turn sooner or later.

These changes include documenting apt dependencies, which are still an unfortunate reality of shipping Python on the Pi - https://github.com/pimoroni/boilerplate-python/blob/f4a64c221efdb358bd78bf5b56bff323cca4ac5f/library/setup.cfg#L45-L49