Brand new GoPiGo3, clean new install of Raspbian Stretch, all updated and upgraded. Followed Dexter instructions for software download via curl, looks to be installed correctly: sudo pip freeze | grep gopigo3 returns gopigo == 1.2.0
Tried fix of this problem in previous post, but GoPiGo2 packages were not installed (“cannot unstall…, not installed”)
and installed update_tools per post, rebooted, but still get:
ImportError: No module named I2C_mutex
when attempt to import easygopigo3.
We are kind of going through a transition period that’s going to be very short where sometimes things (such as this one you mentioned) won’t work. For this issue, please run the following command: it’s going to get the
curl -kL dexterindustries.com/update_tools | bash -s -- --install-python-package --use-python3-exe-too
Please keep in mind that this command may no longer be available (or work) in the following weeks - and that’s because we’re undergoing a couple of internal changes.
When everything will be finished, you’ll be able to simply install the GoPiGo3 (or any other robot) just like you did now and it will work.
I’ve been getting the same error for few days now. The error occurs when software and firmware is updated and i’ve tried it with different operating systems such as Raspbian For Robots and Cinch. I’m using GoPiGo3 and tried it with both python 3 and 2.
The error which occurs:
"Cannot import name ‘Mutex’ "
The command “curl -kL dexterindustries.com/update_tools | bash -s – --install-python-package --use-python3-exe-too” didn’t fix anything for me.
Now when I’m trying to run the command “curl -kL dexterindustries.com/update_tools | bash -s – --install-python-package --use-python3-exe-too” with Raspbian For Robots, it gives a error “error: setup script exited with error: command ‘arm-linux-gnueabihf-gcc’ failed with exit status 1”.
I also followed the instruction provided in this topic with no success:
Let’s try it again with the following one:
curl -kL dexterindustries.com/update_tools | bash -s – --install-python-package --use-python3-exe-too --update-aptget --install-deb-deps
Notice that I’ve added 2 extra options.
Edit: I ran the previous command I gave you on a Raspbian For Robots and it worked.
The command executed succesfully but it didn’t fix the error.
This is the whole error:
Traceback (most recent call last):
File “/home/pi/gfda.py”, line 1, in
import easygopigo3 as easy
File “/usr/local/lib/python3.4/dist-packages/gopigo3-1.2.0-py3.4.egg/easygopigo3.py”, line 11, in
from I2C_mutex import Mutex
ImportError: cannot import name ‘Mutex’
My mistake here - looked at the command I gave you and there is a small typo I did. It’s not
update_rfrtools. So the idea is that you have to run this:
curl -kL dexterindustries.com/update_rfrtools | bash -s – --install-python-package --use-python3-exe-too --update-aptget --install-deb-deps
Sorry about this - as I have said, we’re undergoing a few internal changes and things can change overnight for the next couple of days (weeks in a worst-case scenario).
And please let us know if this fixes your issue.
Will this work with Stretch + gopigo software as described in my OP?
On a fresh version of Stretch, it’s enough if you run:
curl -kL dexterindustries.com/update_gopigo3 | sudo bash
This will take care of everything.
Anyway, the command I mentioned in my last reply can be used on Stretch too.
Please let us know if that works for you. Our users’ feedback is quite important to us in this time because as I said, we’re doing a couple of changes and we need to know everything is up and running.
Did not work. Here’s what I did:
- Fresh download of latest version of Stretch
1.5) Fresh batteries
- Updated, upgraded
- Enabled camera, VNC, I2C
3.5) Motors unplugged
- Ran curl etc per your post
- gopigo3 == 1.2.0 so installed
- Plugged in motors
- Attempt to run easy_DexEyes.py or easy_Distance_Sensor.py (from command line or IDLE): “No module named I2C_mutex”
- Runs Motor.py correctly
- Attempt to run control_panel_gui_3.py: “No module name I2C_mutex”
- Motor encoder programs resulted in L:0 and R:0
That doesn’t make any sense - I did the exact same thing and it worked for me. I’m pretty sure there’s a missing link that goes unnoticed.
There’s another thing we can do and that is to clone the repo and then install it manually. Follow these instructions:
sudo rm -rf RFR_Tools directory/repo and then
git clone https://github.com/DexterInd/RFR_Tools in that directory. Make sure you’ve got the right permissions.
/home/pi/Dexter/lib/Dexter/RFR_Tools/miscellaneous and then run
sudo python setup.py install and
sudo python3 setup.py install. This will get the package installed system-wide.
After this, instantiate a shell with Python and try to import
I2C_mutex module. If it works, proceed with trying to load
If everything went fine to this point, run your programs then.
Let me know if this time it works for you.
Followed your instructions.
git clone command resulted in “repository not found”. Figured out that it needed to be git clone https://github.com/DexterInd/RFR_Tools
both python installs ended with “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” followed by another 4 related errors and finally “c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory”
I’m getting pretty frustrated! All I want is a robotics platform that uses my existing Raspberry Pi 3s (which need to be running Stretch for other classes) to teach Scratch and Python robotics. My $1500 grant application is due in 2 days, but I can’t seem to get this product running and am considering rewriting my proposal to go back to Arduinos. I’m an overworked teacher and don’t really have time to do all of this debugging. Please help!
Okay, I know what the issue is. Please run an
sudo apt-get update and then do the following one:
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
After you do this, please run the installation for the Python package again - the one we discussed in the previous reply. And then please let me know if it worked for you or not. I did try the installation (of R4R_Tools again and even that of the GoPiGo3 and on different versions of Raspbian) and we haven’t had any issues, so at the moment we don’t see the reason why this has failed so bad for you. Hopefully, this is the last thing we need to do.