Trouble installing grovepi

My Pi hung up @ 98% reading packets on curl | bash install;

reboot and git clone install yields this :

./install.sh: line 11: /home/pi/Dexter/lib/Dexter/script_tools/functions_library.sh: No such file or directory
Special thanks to Joe Sanford at Tufts University. This script was derived from his work. Thank you Joe!
./install.sh: line 38: feedback: command not found
I2C-dev already present
i2c-bcm2708 already present
spi-dev already present
./install.sh: line 58: feedback: command not found
i2c1 already present
i2c_arm already present
adduser: The group `i2cā€™ already exists.
./install.sh: line 76: feedback: command not found
./install.sh: line 77: /home/pi/Dexter/lib/Dexter/script_tools/install_avrdude.sh: No such file or directory
./install.sh: line 78: create_avrdude_folder: command not found
./install.sh: line 79: install_avrdude: command not found
done with AVRDUDE for the GrovePi

Rasbian 9.8 (Stretch)

1 Like

Maybe you were doing that while we were updating things around. Just to be clear, this is the install command:

curl -kL dexterindustries.com/update_grovepi | bash

Now, can you retry that again and let us know how it went?

Your Pi could have had a corrupt SD card or maybe it lost access to the internet.

Also, make sure you start with a clean state.

Thank you!

1 Like

Thank you for getting back to me Robert, This is what I got.
Scratch, Test & Troubleshooting, and Advanced Communications appear on the desktop now but are inoperable. My root directory is still pi@raspberrypi (my understanding is that after successful install root will be grovepi?) I have tried install with and without the grove attached, both end with the following fatal error- Thanks again

Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pcā€™
to the PKG_CONFIG_PATH environment variable
No package ā€˜libffiā€™ found
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
error: Setup script exited with error: command ā€˜arm-linux-gnueabihf-gccā€™ failed with exit status 1

1 Like

sorry- this is the process that was running when package not found-

Downloading https://files.pythonhosted.org/packages/29/3d/a50bd997979c7554c9c571753d34e976eb88ebf41d3a66accb2468bd3c69/smbus-cffi-0.5.1.tar.gz#sha256=fb4195aaabfc01586863f60d3190b5cb1bf8f12622fd597e23e48768dad6bde8
Best match: smbus-cffi 0.5.1
Processing smbus-cffi-0.5.1.tar.gz
Writing /tmp/easy_install-mRadSL/smbus-cffi-0.5.1/setup.cfg
Running smbus-cffi-0.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-mRadSL/smbus-cffi-0.5.1/egg-dist-tmp-fhqWo1

1 Like

So itā€™s all good now?

My root directory is still pi@raspberrypi (my understanding is that after successful install root will be grovepi?)

Your root directory will still be /home/pi and your user will stay the same. Nothing changes from this perspective.

Anyhow, if it still doesnā€™t work for you, can you try installing smbus-cffi separately? With the following commands:

sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev
sudo pip install cffi && sudo pip3 install cffi

Thank you!

1 Like
sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev
sudo pip install cffi && sudo pip3 install cffi

Hi, is this all I need to install in order to use GrovePi, instead of the install.sh script?
Thanks.

1 Like

Iā€™m no expert on the Grove Pi, but its been my experience that if the maintainers provide an install script/method, itā€™s generally a good idea to use it. It may pull in dependencies, set paths, create named directories or set permissions.

Go with the proven method, it will likely save you mucho grief.

Totally agree with you. But following the script returned some errorsā€¦ sadā€¦
I guess I will have to spend more time on itā€¦
Thanksā€¦

1 Like

Now weā€™re getting somewhere.

Rerun the scripts and post the results.

Question:
Are you running the scripts as the ā€œpiā€ user? Thatā€™s a hard-coded requirement.

I managed to find a way to finalize the installation. If I run the install.sh now, it gives me the following message.

pi@raspberrypi:~/Desktop/GrovePi/Script $ sudo ./install.sh
Special thanks to Joe Sanford at Tufts University. This script was derived from his work. Thank you Joe!
Adding I2C-dev and SPI-dev in /etc/modules . . .
I2C-dev already present
i2c-bcm2708 already present
spi-dev already present
Making I2C changes in /boot/config.txt . . .
i2c1 already present
i2c_arm already present
The user `pi' is already a member of `i2c'.
Installing avrdude for the GrovePi
/home/pi/Dexter/lib/AVRDUDE Found!
avrdude 5.10 Found
done with AVRDUDE for the GrovePi

But I think grovepi library is not installed properly. Because whenever I try to run a .py file in the example folder, it gives the following message.


pi@raspberrypi:~/Desktop/GrovePi/Software/Python $ sudo python grove_buzzer.py
Traceback (most recent call last):
  File "grove_buzzer.py", line 37, in <module>
    import grovepi
  File "/home/pi/Desktop/GrovePi/Software/Python/grovepi.py", line 54, in <module>
    import di_i2c
  File "build/bdist.linux-armv7l/egg/di_i2c.py", line 27, in <module>
ImportError: No module named periphery

or using python3


pi@raspberrypi:~/Desktop/GrovePi/Software/Python $ sudo python3 grove_buzzer.py
Traceback (most recent call last):
  File "grove_buzzer.py", line 37, in <module>
    import grovepi
  File "/home/pi/Desktop/GrovePi/Software/Python/grovepi.py", line 54, in <module>
    import di_i2c
ImportError: No module named 'di_i2c'

So it appears that I need a ā€œperipheryā€ module in python, so I didā€¦

pi@raspberrypi:~/Desktop/GrovePi/Software/Python $ sudo pip install periphery
Collecting periphery
  Could not find a version that satisfies the requirement periphery (from versions: )
No matching distribution found for periphery
pi@raspberrypi:~/Desktop/GrovePi/Software/Python $ sudo pip3 install periphery
Collecting periphery
  Could not find a version that satisfies the requirement periphery (from versions: )
No matching distribution found for periphery

Last thing I tried is to reinstall grovepi library, but it seems it is already there just fine.

pi@raspberrypi:~/Desktop/GrovePi/Software/Python $ sudo pip3 install grovepi
Requirement already satisfied: grovepi in /usr/local/lib/python3.5/dist-packages/grovepi-1.4.1-py3.5.egg
Requirement already satisfied: RPi.GPIO in /usr/lib/python3/dist-packages (from grovepi)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from grovepi)
Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (from grovepi)
Requirement already satisfied: scipy in /usr/lib/python3/dist-packages (from grovepi)
Collecting smbus-cffi (from grovepi)
  Downloading https://www.piwheels.org/simple/smbus-cffi/smbus_cffi-0.5.1-cp35-cp35m-linux_armv7l.whl
Requirement already satisfied: cffi>=1.1.0 in /usr/local/lib/python3.5/dist-packages (from smbus-cffi->grovepi)
Requirement already satisfied: pycparser in /usr/local/lib/python3.5/dist-packages (from cffi>=1.1.0->smbus-cffi->grovepi)
Installing collected packages: smbus-cffi
Successfully installed smbus-cffi-0.5.1

This is my story. lolā€¦

1 Like

What operating system are you using? What version?

What version of the Raspberry Pi are you trying to install this on?

Have you done anything else prior to the Grove software?

This comes from RaspianForRobot Tools

Here is how I installed that:

=== R4R_Tools (for I2C_mutex)
$ sudo git clone https://github.com/DexterInd/RFR_Tools.git /home/pi/Dexter/lib/Dexter/RFR_Tools
$ sudo apt-get install libffi-dev
$ cd /home/pi/Dexter/lib/Dexter//RFR_Tools/miscellaneous/
$ sudo python3 setup.py install


Check that the mutex stuff will be available:

$ unzip -l /usr/local/lib/python3.8/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.8.egg
Archive:  /usr/local/lib/python3.8/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.8.egg
  Length      Date    Time    Name
---------  ---------- -----   ----
     3154  2021-05-31 15:48   I2C_mutex.py
     9445  2021-05-31 15:48   auto_detect_robot.py
     6211  2021-05-31 15:48   auto_detect_rpi.py
    23756  2021-05-31 15:48   di_i2c.py
     1700  2021-05-31 15:48   di_mutex.py
      303  2021-05-31 15:51   EGG-INFO/PKG-INFO
      372  2021-05-31 15:51   EGG-INFO/SOURCES.txt
        1  2021-05-31 15:51   EGG-INFO/dependency_links.txt
       46  2021-05-31 15:51   EGG-INFO/requires.txt
       60  2021-05-31 15:51   EGG-INFO/top_level.txt
        1  2021-05-31 15:51   EGG-INFO/zip-safe
     2812  2021-05-31 15:51   __pycache__/I2C_mutex.cpython-38.pyc
     6565  2021-05-31 15:51   __pycache__/auto_detect_robot.cpython-38.pyc
     4592  2021-05-31 15:51   __pycache__/auto_detect_rpi.cpython-38.pyc
    14282  2021-05-31 15:51   __pycache__/di_i2c.cpython-38.pyc
     1652  2021-05-31 15:51   __pycache__/di_mutex.cpython-38.pyc
---------                     -------
    74952                     16 files
1 Like

Excellent!

Question:

In my copies of the Dexter/MR operating system, there appears to be more eggs there than a hen-house - and many have the exact same names.

Which ones are the canonical versions and/or how do you know which one is the most current version?

Hi, It is 3 B+ version of the pi. I am using the stock Raspbian OS.
Prior to this, I set up apache and mardiaDB in it. This is my first attempt with sensors.

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
1 Like

Hi,
Thanks for your help.
I got the buzzer working at this point. I guess that is a good sign. Will try something else after get home.

So, I followed your instructionā€¦ I think many of those things supposed to install are already installed. But at one point in the sudo python3 setup.py install part, it said,

Couldn't find index page for 'wiringpi' (maybe misspelled?)

So I tried to install it using pip, and it did.
Then when I run it again, it said

Couldn't find index page for 'python-periphery' (maybe misspelled?)

So I tried to use pip to install it again.

Then the buzzer worked. I will test something else later.
Thanks for all your help.

For your referenceā€¦

$ sudo git clone https://github.com/DexterInd/RFR_Tools.git /home/pi/Dexter/lib/Dexter/RFR_Tools
fatal: destination path '/home/pi/Dexter/lib/Dexter/RFR_Tools' already exists and is not an empty directory.

$ sudo apt-get install libffi-devReading package lists... Done
Building dependency tree       
Reading state information... Done
libffi-dev is already the newest version (3.2.1-6).
The following packages were automatically installed and are no longer required:
  autotools-dev cdbs coinor-libipopt1v5 icu-devtools libblas-dev libbz2-dev libc-ares2
  libhttp-parser2.8 libicu-dev liblapack-dev liblzma-dev libmumps-seq-4.10.0 libncurses5-dev
  libpcre3-dev libpcre32-3 libpcrecpp0v5 libpng-tools libraw15 libreadline-dev libtinfo-dev libuv1
  lxkeymap nodejs-doc python-xklavier realpath
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.

$ cd /home/pi/Dexter/lib/Dexter//RFR_Tools/miscellaneous/

$ sudo python3 setup.py install
running install
running bdist_egg
running egg_info
writing top-level names to Dexter_AutoDetection_and_I2C_Mutex.egg-info/top_level.txt
writing requirements to Dexter_AutoDetection_and_I2C_Mutex.egg-info/requires.txt
writing dependency_links to Dexter_AutoDetection_and_I2C_Mutex.egg-info/dependency_links.txt
writing Dexter_AutoDetection_and_I2C_Mutex.egg-info/PKG-INFO
reading manifest file 'Dexter_AutoDetection_and_I2C_Mutex.egg-info/SOURCES.txt'
writing manifest file 'Dexter_AutoDetection_and_I2C_Mutex.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build/bdist.linux-armv7l/egg
copying build/lib/di_i2c.py -> build/bdist.linux-armv7l/egg
copying build/lib/di_mutex.py -> build/bdist.linux-armv7l/egg
copying build/lib/auto_detect_robot.py -> build/bdist.linux-armv7l/egg
copying build/lib/auto_detect_rpi.py -> build/bdist.linux-armv7l/egg
copying build/lib/I2C_mutex.py -> build/bdist.linux-armv7l/egg
byte-compiling build/bdist.linux-armv7l/egg/di_i2c.py to di_i2c.cpython-35.pyc
byte-compiling build/bdist.linux-armv7l/egg/di_mutex.py to di_mutex.cpython-35.pyc
byte-compiling build/bdist.linux-armv7l/egg/auto_detect_robot.py to auto_detect_robot.cpython-35.pyc
byte-compiling build/bdist.linux-armv7l/egg/auto_detect_rpi.py to auto_detect_rpi.cpython-35.pyc
byte-compiling build/bdist.linux-armv7l/egg/I2C_mutex.py to I2C_mutex.cpython-35.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying Dexter_AutoDetection_and_I2C_Mutex.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Dexter_AutoDetection_and_I2C_Mutex.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Dexter_AutoDetection_and_I2C_Mutex.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Dexter_AutoDetection_and_I2C_Mutex.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Dexter_AutoDetection_and_I2C_Mutex.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.5.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.5.egg
Removing /usr/local/lib/python3.5/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.5.egg
Copying Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.5.egg to /usr/local/lib/python3.5/dist-packages
Dexter-AutoDetection-and-I2C-Mutex 0.0.0 is already the active version in easy-install.pth

Installed /usr/local/lib/python3.5/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.5.egg
Processing dependencies for Dexter-AutoDetection-and-I2C-Mutex==0.0.0
Searching for python-periphery
Reading https://pypi.python.org/simple/python-periphery/
Couldn't find index page for 'python-periphery' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or working download links found for python-periphery
error: Could not find suitable distribution for Requirement.parse('python-periphery')


$ sudo python setup.py installrunning install
running bdist_egg
running egg_info
writing requirements to Dexter_AutoDetection_and_I2C_Mutex.egg-info/requires.txt
writing Dexter_AutoDetection_and_I2C_Mutex.egg-info/PKG-INFO
writing top-level names to Dexter_AutoDetection_and_I2C_Mutex.egg-info/top_level.txt
writing dependency_links to Dexter_AutoDetection_and_I2C_Mutex.egg-info/dependency_links.txt
reading manifest file 'Dexter_AutoDetection_and_I2C_Mutex.egg-info/SOURCES.txt'
writing manifest file 'Dexter_AutoDetection_and_I2C_Mutex.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build/bdist.linux-armv7l/egg
copying build/lib.linux-armv7l-2.7/di_i2c.py -> build/bdist.linux-armv7l/egg
copying build/lib.linux-armv7l-2.7/di_mutex.py -> build/bdist.linux-armv7l/egg
copying build/lib.linux-armv7l-2.7/auto_detect_robot.py -> build/bdist.linux-armv7l/egg
copying build/lib.linux-armv7l-2.7/auto_detect_rpi.py -> build/bdist.linux-armv7l/egg
copying build/lib.linux-armv7l-2.7/I2C_mutex.py -> build/bdist.linux-armv7l/egg
byte-compiling build/bdist.linux-armv7l/egg/di_i2c.py to di_i2c.pyc
byte-compiling build/bdist.linux-armv7l/egg/di_mutex.py to di_mutex.pyc
byte-compiling build/bdist.linux-armv7l/egg/auto_detect_robot.py to auto_detect_robot.pyc
byte-compiling build/bdist.linux-armv7l/egg/auto_detect_rpi.py to auto_detect_rpi.pyc
byte-compiling build/bdist.linux-armv7l/egg/I2C_mutex.py to I2C_mutex.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying Dexter_AutoDetection_and_I2C_Mutex.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Dexter_AutoDetection_and_I2C_Mutex.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Dexter_AutoDetection_and_I2C_Mutex.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Dexter_AutoDetection_and_I2C_Mutex.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Dexter_AutoDetection_and_I2C_Mutex.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py2.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py2.7.egg
Removing /usr/local/lib/python2.7/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py2.7.egg
Copying Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Dexter-AutoDetection-and-I2C-Mutex 0.0.0 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py2.7.egg
Processing dependencies for Dexter-AutoDetection-and-I2C-Mutex==0.0.0
Searching for python-periphery
Reading https://pypi.python.org/simple/python-periphery/
Couldn't find index page for 'python-periphery' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or working download links found for python-periphery
error: Could not find suitable distribution for Requirement.parse('python-periphery')


$ unzip -l /usr/local/lib/python3.5/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.5.egg
Archive:  /usr/local/lib/python3.5/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.5.egg
  Length      Date    Time    Name
---------  ---------- -----   ----
    23756  2021-07-22 01:06   di_i2c.py
     1700  2021-07-22 01:06   di_mutex.py
     9445  2021-07-22 01:06   auto_detect_robot.py
     6211  2021-07-22 01:06   auto_detect_rpi.py
     3154  2021-07-22 01:06   I2C_mutex.py
        1  2021-07-23 17:58   EGG-INFO/zip-safe
       60  2021-07-23 17:58   EGG-INFO/top_level.txt
      303  2021-07-23 17:58   EGG-INFO/PKG-INFO
        1  2021-07-23 17:58   EGG-INFO/dependency_links.txt
       46  2021-07-23 17:58   EGG-INFO/requires.txt
      372  2021-07-23 17:58   EGG-INFO/SOURCES.txt
    15630  2021-07-23 17:58   __pycache__/di_i2c.cpython-35.pyc
     4974  2021-07-23 17:58   __pycache__/auto_detect_rpi.cpython-35.pyc
     1759  2021-07-23 17:58   __pycache__/di_mutex.cpython-35.pyc
     2991  2021-07-23 17:58   __pycache__/I2C_mutex.cpython-35.pyc
     6940  2021-07-23 17:58   __pycache__/auto_detect_robot.cpython-35.pyc
---------                     -------
    77343                     16 files

1 Like

Before you go crazy, try running the latest version of Raspbian for Robots since everything is already installed there and see what happens.

1 Like