Continuing the discussion from No module named I2C_mutex:
I just tried a fresh install of the GoPiGo libraries on a generic Buster install using the standard install scripts for the GoPiGo libraries and sensors. When I attempted to run a simple test script that moves the servos, I received the following errors:
Python 3.7.3 (/usr/bin/python3)
>>> %Run test_servos.py
Traceback (most recent call last):
File "/home/pi/Desktop/test_servos.py", line 1, in <module>
import easygopigo3 as easy
File "/usr/local/lib/python3.7/dist-packages/gopigo3-1.3.2.1-py3.7.egg/easygopigo3.py", line 13, in <module>
import easysensors
File "/usr/local/lib/python3.7/dist-packages/gopigo3-1.3.2.1-py3.7.egg/easysensors.py", line 1, in <module>
from I2C_mutex import Mutex
ModuleNotFoundError: No module named 'I2C_mutex'
>>>
Following the instructions in the above referenced article, I then ran the following:
sudo apt-get install -y build-essential libi2c-dev i2c-tools python-dev python3-dev python-setuptools python3-setuptools python-pip python3-pip libffi-dev
. . . which reported that everything is current.
Then, as instructed above, I ran:
pi@raspberrypi:~/Dexter/lib/Dexter $ git clone https://github.com/DexterInd/RFR_Tools
pi@raspberrypi:~/Dexter/lib/Dexter $ cd /home/pi/Dexter/lib/Dexter/RFR_Tools/miscellaneous
pi@raspberrypi:~/Dexter/lib/Dexter/RFR_Tools/miscellaneous $ sudo python setup.py install
. . . . which generated the following error
Running smbus-cffi-0.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-beKJuz/smbus-cffi-0.5.1/egg-dist-tmp-h6znWW
File "build/bdist.linux-armv7l/egg/cffi/_shimmed_dist_utils.py", line 16
raise Exception("This CFFI feature requires setuptools on Python >= 3.12. The setuptools module is missing or non-functional.") from ex
^
SyntaxError: invalid syntax
File "/tmp/easy_install-beKJuz/smbus-cffi-0.5.1/.eggs/cffi-1.17.1-py2.7-linux-armv7l.egg/cffi/_shimmed_dist_utils.py", line 16
raise Exception("This CFFI feature requires setuptools on Python >= 3.12. The setuptools module is missing or non-functional.") from ex
^
SyntaxError: invalid syntax
. . . . and then
Running pycparser-2.22/setup.py -q bdist_egg --dist-dir /tmp/easy_install-beKJuz/smbus-cffi-0.5.1/temp/easy_install-Cor99x/pycparser-2.22/egg-dist-tmp-Uwp7NW
warning: no previously-included files found matching 'setup.pyc'
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'
. . . which was followed by an extremely long traceback which ended with:
File "/usr/lib/python2.7/sre_compile.py", line 583, in compile
"sorry, but this version only supports 100 named groups"
AssertionError: sorry, but this version only supports 100 named groups
Then I ran:
pi@raspberrypi:~/Dexter/lib/Dexter/RFR_Tools/miscellaneous $ sudo python3 setup.py install
. . . which completed without errors.
Attempting to run my servo test script succeeded.
>>> %Run test_servos.py
Center Both Servos
Test Servo 1
Test Servo 2
Re-Center Both Servos
>>>
I have created an issue on GitHub about this and have referenced this forum thread.
Has anyone else experienced this?
I do not yet know if this affects Bullseye or Bookworm as I have not yet tried installations there. (I’m planning to follow the instructions posted by @cyclicalobsessive in his repo’s.)