Closed metadiablo-glyph closed 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
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.
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.
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.
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.
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.
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
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 includesudo 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.
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