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

ModuleNotFoundError when importing mpu6050 #29

Open
gwonglapierre opened this issue Mar 6, 2020 · 7 comments
Open

ModuleNotFoundError when importing mpu6050 #29

gwonglapierre opened this issue Mar 6, 2020 · 7 comments

Comments

@gwonglapierre
Copy link

the smbus installation worked, I was able to test the i2c and that works. I also got no errors when installing through pip install. However as soon as I try to run a script in Python3, it says that:
Traceback (most recent call last):
File "/home/pi/Documents/gyrompu.py", line 1, in
import mpu6050 as mpu6050
ModuleNotFoundError: No module named 'mpu6050'

@gwonglapierre
Copy link
Author

seems like the issue is within Python because it is working when I'm using a script that's located in the same directory as the mpu6050.py

@sutanu86
Copy link

same issue

@m-rtijn
Copy link
Owner

m-rtijn commented Mar 23, 2020

@sutanu86 Did you install the package? If so, how?

@CHANCELIER did you use the same python version for installing the package as for running it?

@romybompart
Copy link

Hi, I just released a version that might help for different platform: Jetson nano, raspberry pi, Beaglebone, pyboard, ODROID and more.

It is based on mr Tijn package.

https://github.com/romybompart/py_imu_mpu6050
https://pypi.org/project/py-imu-mpu6050/

Now that is working in different platform I will add self_calibration functions and
Magnetometer support

@MarCixn
Copy link

MarCixn commented Dec 18, 2020

git clone https://github.com/Tijndagamer/mpu6050.git

cd mpu6050

sudo python setup.py install

@EbGu3
Copy link

EbGu3 commented Oct 1, 2021

Hello, you can see what is the directory that save the files when you install the mpu6050, for example in my case add in ./.local/lib/python2.7/site-packages... if you run you can try to run with python2 <filename.py>

@JohnAllen
Copy link

JohnAllen commented Oct 17, 2024

git clone https://github.com/Tijndagamer/mpu6050.git

cd mpu6050

sudo python setup.py install

This didn't work for me.

"ModuleNotFoundError: No module named 'smbus'"

python3-smbus is installed

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

7 participants