Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i2c mutex module not installed during installation from GitHub #338

Open
jharris1993 opened this issue Sep 15, 2024 · 1 comment
Open

i2c mutex module not installed during installation from GitHub #338

jharris1993 opened this issue Sep 15, 2024 · 1 comment

Comments

@jharris1993
Copy link
Contributor

jharris1993 commented Sep 15, 2024

Installation target: Generic Buster image install from Raspberry Pi installation sources.

Additional information can be found at:
https://forum.dexterindustries.com/t/reprise-no-module-named-i2c-mutex/9957

Using either installation method, (Quick install, including sensors or the manual install method), attempting to run something using easygopigo returns 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'
>>> 

How do I install this module?
Can it be included in the standard install process?

@slowrunner
Copy link
Contributor

slowrunner commented Sep 22, 2024

Installation target: Generic Buster image install from Raspberry Pi installation sources.

Confirmed this issue is with installing GoPiGo3 software over the 2023-05-03 32-bit Buster archive

Using .. Quick install

Execution of:

curl -kL dexterindustries.com/update_gopigo3 | bash

from the https://github.com/DexterInd/GoPiGo3#quick-install documentation

RESULT - quiet install error only for Python3:

...
Searching for smbus-cffi
Reading https://pypi.org/simple/smbus-cffi/
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-WNkdjK/smbus-cffi-0.5.1/setup.cfg
Running smbus-cffi-0.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-WNkdjK/smbus-cffi-0.5.1/egg-dist-tmp-msXzMM
  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-WNkdjK/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

...

GOPIGO3 SOFTWARE INSTALLATION SUCCESSFUL.

Only good for Python2 - did not succeed for Python3

pi@Go3Bus32:~ $ python
Python 2.7.16 (default, Sep 20 2023, 07:59:17) 
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import I2C_mutex
>>>

 
pi@Go3Bus32:~ $ python3
Python 3.7.3 (default, Mar 23 2024, 16:12:05) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import I2C_mutex
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'I2C_mutex'
>>>

Continue with the DI Sensors install (which will again fail building Dexter-AutoDetection-and-I2C-mutex egg)

curl -kL dexterindustries.com/update_sensors | bash
...
Finished processing dependencies for Line-Follower==1.0.0
Configuring the red line follower in DI_Sensors installation
Done configuring the red line follower in DI_Sensors installation

I2C_mutex still missing for Python3:

pi@Go3Bus32:~ $ python3
Python 3.7.3 (default, Mar 23 2024, 16:12:05) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import di_sensors
>>> import I2C_mutex
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'I2C_mutex'
>>> 

WORKAROUND - Execute:

cd ~/Dexter/lib/Dexter/RFR_Tools/miscellaneous/
sudo python3 setup.py install

RESULT:

...
Finished processing dependencies for Dexter-AutoDetection-and-I2C-Mutex==1.3.2


pi@Go3Bus32:~/Dexter/lib/Dexter/RFR_Tools/miscellaneous $ python3
Python 3.7.3 (default, Mar 23 2024, 16:12:05) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import I2C_mutex
>>> import di_sensors
>>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants