Coder Social home page Coder Social logo

Comments (10)

alphanumeric007 avatar alphanumeric007 commented on July 19, 2024 1

That has got mine working, thanks again. =)

from bme280-python.

tedder avatar tedder commented on July 19, 2024 1

The problem is the wheel files. They don't contain any code:

$ unzip -l pimoroni_bme280-0.1.0-py3-none-any.whl 
Archive:  pimoroni_bme280-0.1.0-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     1070  10-30-2020 11:25   pimoroni_bme280-0.1.0.dist-info/LICENSE.txt
     2243  10-30-2020 11:25   pimoroni_bme280-0.1.0.dist-info/METADATA
       92  10-30-2020 11:25   pimoroni_bme280-0.1.0.dist-info/WHEEL
        1  10-30-2020 11:25   pimoroni_bme280-0.1.0.dist-info/top_level.txt
      429  10-30-2020 11:25   pimoroni_bme280-0.1.0.dist-info/RECORD
---------                     -------
     3835                     5 files

from bme280-python.

daniel-rhoades avatar daniel-rhoades commented on July 19, 2024

Same for me. Looks like the packaging for the latest version (0.1.0 released today) maybe an issue.

After installing the previous version: pip install pimoroni-bme280==0.0.2 it works.

from bme280-python.

alphanumeric007 avatar alphanumeric007 commented on July 19, 2024

I'll have to give that a try.

from bme280-python.

Gadgetoid avatar Gadgetoid commented on July 19, 2024

@tedder ugh! Good spot. I had put the package directive in the wrong part of setup.cfg and it quietly broke the package.

from bme280-python.

rickybalboa63 avatar rickybalboa63 commented on July 19, 2024

I still have this problem. If I run the program using IDLE python(3.7.3) it doesn't work but if I run it in the cmd terminal using 'python all-values.py' it does work. I have tried sudo pip3 install pimoroni-bme280 smbus and this does not solve it.
Any help please, trying to get this to work with matplotlib and that needs python3.
Thanks

from bme280-python.

Gadgetoid avatar Gadgetoid commented on July 19, 2024

@rickybalboa63 if you haven't discovered so already, you need to be explicit about upgrading a package:

sudo pip3 install --upgrade pimoroni-bme280

And it sometimes pays to refer to the specific Python version since... well Python can get dicey relating pip back to the Python you expect something else to be running in:

python37 -m pip install --upgrade pimoroni-bme280

from bme280-python.

tin- avatar tin- commented on July 19, 2024

This package seem to be still broken. Tried to run in on Pi3 in either Python2 or Python3 environment with same results:

root@raspi:/home/root/Pimoroni/pimoroni-bme280/examples# python ./all-values.py
Traceback (most recent call last):
  File "./all-values.py", line 8, in <module>
    from bme280 import BME280
ImportError: No module named 'bme280'
root@raspi:/home/root/Pimoroni/pimoroni-bme280/examples# python2 ./all-values.py
Traceback (most recent call last):
  File "./all-values.py", line 8, in <module>
    from bme280 import BME280
ImportError: cannot import name BME280

Device is present in i2c detect and package was installed using both github with latest code or via pip.


root@raspb:/home/root/Pimoroni/pimoroni-bme280/examples# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- 77
root@raspi:/home/root/Pimoroni/pimoroni-bme280/examples# uname -a
Linux raspb 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux
root@raspi:/home/root/Pimoroni/pimoroni-bme280/examples# python --version
Python 3.5.3
root@raspb:/home/root/Pimoroni/pimoroni-bme280/examples# python2 --version
Python 2.7.13

from bme280-python.

alphanumeric007 avatar alphanumeric007 commented on July 19, 2024

Try running
sudo pip3 install pimoroni-bme280 smbus
Then try the examples again.

from bme280-python.

Gadgetoid avatar Gadgetoid commented on July 19, 2024

Fingers crossed I don't break everything again with v1.0.0...

from bme280-python.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.