microsoft/IoT-For-Beginners

Cannot install necessary programs to setup Raspberry Pi. Always getting errors.

ritog opened this issue · 4 comments

ritog commented

Discussed in #377

Originally posted by ghosh-r May 21, 2022
I am trying to use a Raspberry Pi as a headless device, and while I am connected to it through ssh, I cannot complete the suggested setup.

I am trying to follow instruction from the Raspberry Pi page.

There, the instruction is to run a full upgrade and then run these commands:

curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -

But, when I run this command, I get thrown a lot of errors, the last line of which is:

-------------------------------------------------------
     Grove.py installation FAILED, FAILED, FAILED      
-------------------------------------------------------

And here is the full output:

Click for full output!
 Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Hit:1 https://seeed-studio.github.io/pi_repo stretch InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:3 http://archive.raspberrypi.org/debian bullseye InRelease  
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python3-pip

E: Package 'python-pip' has no installation candidate
dpkg-query: package 'python-pip' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python3-pip

E: Package 'python-pip' has no installation candidate
dpkg-query: package 'python-pip' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python3-pip

E: Package 'python-pip' has no installation candidate
dpkg-query: package 'python-pip' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pip is already the newest version (20.3.4-4+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I2C interface enabled...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-rpi.gpio is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-rpi.gpio' has no installation candidate
dpkg-query: package 'python-rpi.gpio' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-rpi.gpio is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-rpi.gpio' has no installation candidate
dpkg-query: package 'python-rpi.gpio' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-rpi.gpio is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-rpi.gpio' has no installation candidate
dpkg-query: package 'python-rpi.gpio' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
-------------------------------------------------------
     Grove.py installation FAILED, FAILED, FAILED      
-------------------------------------------------------

Can you help me find a solution to this?

ritog commented

Note that I have finished the rest of the setup.

image

The Speed script only works on older Raspberry Pi OS versions. It depends on Python 2, but this is not installed on the latest Bullseye versions of Raspberry Pi OS.

You need to do this to install the Grove libraries:

sudo apt install git python3-dev python3-pip --yes

git clone https://github.com/Seeed-Studio/grove.py
cd grove.py
sudo pip3 install .

sudo raspi-config nonint do_i2c 0

I'm working through this at the moment updating all the out of date stuff, so this will be updated in the lesson in the next couple of days.

okay thanks

Instructions are updated, so closing this. Thanks for your feedback!