-
Notifications
You must be signed in to change notification settings - Fork 25
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
ImportError #28
Comments
How did you install the library? |
Did you Edit: okay, plot twist - I just ran into exactly this error on a ROCK 5B. It was fixed with |
sudo pip install pimoroni-bme280 |
also ran the installer too... |
Must be somehow getting an older version of the library, since there was a bug like this prior to v0.1.1 - 9107157 What do you see if you: And also:
|
|
Okay that bme280 library is not our bme280 library, I wonder if it's just shadowing ours or was installed by the installer accidentally. Try:
|
pi@Grow4:~ $ pip uninstall bme280 During handling of the above exception, another exception occurred: Traceback (most recent call last): |
i've probably have install a few bme280 libraries playing |
Ok, I know there are Turtles and then Me. So, got me, still don't work ` locate bme280.py /usr/local/lib/python3.9/dist-packages/bme280-0.6.dist-info: pi@pi5:~ $ python3 -m pip install pimoroni-bme280 × This environment is externally managed
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. ` |
You should now be working in a virtual environment. I've explained why in exhaustive detail here: pimoroni/boilerplate-python#13 If it sounds like tedious nonsense to you, welcome to the last two months of my life. In short, you'll need to:
Then install everything into that virtual environment with
You can add |
Trying to run some examples, but not working real well
pi@Grow4:~/bme280-python/examples $ ls all-values.py dump-calibration.py relative-altitude.py temperature-forced-mode.py compensated-temperature.py local_altitude.py temperature-compare.py pi@Grow4:~/bme280-python/examples $ python compensated-temperature.py Traceback (most recent call last): File "/home/pi/bme280-python/examples/compensated-temperature.py", line 6, in <module> from bme280 import BME280 ImportError: cannot import name 'BME280' from 'bme280' (/usr/local/lib/python3.9/dist-packages/bme280/__init__.py) pi@Grow4:~/bme280-python/examples $ python dump-calibration.py Traceback (most recent call last): File "/home/pi/bme280-python/examples/dump-calibration.py", line 7, in <module> from bme280 import BME280 ImportError: cannot import name 'BME280' from 'bme280' (/usr/local/lib/python3.9/dist-packages/bme280/__init__.py) pi@Grow4:~/bme280-python/examples $ python relative-altitude.py Traceback (most recent call last): File "/home/pi/bme280-python/examples/relative-altitude.py", line 9, in <module> from bme280 import BME280 ImportError: cannot import name 'BME280' from 'bme280' (/usr/local/lib/python3.9/dist-packages/bme280/__init__.py) pi@Grow4:~/bme280-python/examples $
Jeff
The text was updated successfully, but these errors were encountered: