# Installing BME680 Breakout library for Python 3 FAILS

**URL:** <https://forums.pimoroni.com/t/installing-bme680-breakout-library-for-python-3-fails/24463>\
**Category:** Support\
**Created:** [March 17, 2024, 7:42am UTC](https://forums.pimoroni.com/t/installing-bme680-breakout-library-for-python-3-fails/24463 "2024-03-17T07:42:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wiseworm](https://avatars.discourse-cdn.com/v4/letter/w/8797f3/32.png) [@wiseworm](https://forums.pimoroni.com/u/wiseworm)\
**Post date:** [March 17, 2024, 7:42am UTC](https://forums.pimoroni.com/t/installing-bme680-breakout-library-for-python-3-fails/24463/1 "2024-03-17T07:42:46Z")

</div>

Hi all,  
I am trying to setup the [BME688 Air Sensor](https://shop.pimoroni.com/products/bme688-breakout?variant=39336951709779) on my Raspberry Pi 3 Model B Rev 1.2 running bookworm (downloaded and installed 16/3/24).  
As i am general noob i opted for the “quick and painless one-line-installer”(Sorry limited on links as new user) as mentioned on the BME688 Air Sensor page.  
The bash script is failing.

```auto
Installing BME680 Breakout library for Python 3...

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    For more information visit http://rptl.io/venv

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.
hint: See PEP 668 for the detailed specification.
Python 3 library install failed!
If problems persist, visit forums.pimoroni.com for support

```

I have tried to research this but am struggling with what to change in the script. Something appears to be outdated in the code that relates to the use of using **pip3** and the most recent Raspberry OS.  
[I found this post has an answer that descrbes the issue in detail](https://stackoverflow.com/questions/75602063/pip-install-r-requirements-txt-is-failing-this-environment-is-externally-mana)

> Your distribution is trying to protect you against mixing `apt` provided packages and `pip` provided packages. Mixing two package managers (`apt` and `pip` here) is always a bad idea and the source of many issues.

I guess the quick solution will be to try and older rasbian OS release as something needs amending in the current provided soution.

Thanks

BAB

---

<div class="post-metadata">

**Author:** ![wiseworm](https://avatars.discourse-cdn.com/v4/letter/w/8797f3/32.png) [@wiseworm](https://forums.pimoroni.com/u/wiseworm)\
**Post date:** [March 17, 2024, 8:54am UTC](https://forums.pimoroni.com/t/installing-bme680-breakout-library-for-python-3-fails/24463/2 "2024-03-17T08:54:02Z")

</div>

Edit wouldnt work, 422 error, whatever that is…

\*Edit - Just tried previous rasp OS but the script breaks on old OS images

```auto
Note: BME680 Breakout requires I2C communication

Do you wish to continue? [y/N] y

Checking environment...
Updating apt indexes...
.....................E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldoldstable'
E: Repository 'http://archive.raspberrypi.org/debian buster InRelease' changed its 'Suite' value from 'testing' to 'oldoldstable'
Apt failed to update indexes!

```

So i guess that makes this sensor useless for us newbies, at least while the script is broken.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [March 17, 2024, 9:27am UTC](https://forums.pimoroni.com/t/installing-bme680-breakout-library-for-python-3-fails/24463/3 "2024-03-17T09:27:19Z")

</div>

Which old OS did you install? I select “Pi OS Legacy” from the list and haven’t had any issues with the current Pimoroni installers. I haven’t used the BME680 one just yet though.

If you go back too far you may install a version that has been archived. As far as I know, that does break things update wise?

[Virtual Environments, Libgpiod, gpiodevice and the current mess I’m making of our Python libraries - Support - Pimoroni Buccaneers](https://forums.pimoroni.com/t/virtual-environments-libgpiod-gpiodevice-and-the-current-mess-im-making-of-our-python-libraries/23765)

---

<div class="post-metadata">

**Author:** ![wiseworm](https://avatars.discourse-cdn.com/v4/letter/w/8797f3/32.png) [@wiseworm](https://forums.pimoroni.com/u/wiseworm)\
**Post date:** [March 17, 2024, 10:24am UTC](https://forums.pimoroni.com/t/installing-bme680-breakout-library-for-python-3-fails/24463/4 "2024-03-17T10:24:04Z")

</div>

Awesome! legacy OS worked! thanks!
