On 10/10/2023, Debian Bookworm was released for the Raspberry Pi. This OS has a number of new features that improve the GUI as well as some behind the scenes improvements. One change however, may be a little painful for users of Python. Specifically, any code that uses a library added via the pip utility should be added and executed inside a virtual environment. While the reasons for doing this are valid (see PEP 668 for more details), the solution is somewhat draconian. Perhaps a more elegant solution will arrive in a later release of the OS, but until then, you can choose to either hold off upgrading to Bookworm (and stay with Bullseye) or to do the following:

  1. Start with a new Bookworm installation
  2. Open a terminal window and create a new directory: mkdir Pi-Plates
  3. Enter the new directory with: cd Pi-Plates
  4. Create a new virtual environment that inherits all currently installed packages with python -m venv --system-site-packages env
  5. Enter the virtual environment with source env/bin/activate
  6. Your command line prompt should now have a prefix of (env)
  7. We can now use pip to install and access the Pi-Plate modules: pip install Pi-Plates
  8. If you are using PIPLATElogger then you will have to install and run it from inside this environment as well. Simply follow the normal installation procedure documented HERE.
  9. If you need to exit the virtual environment, execute deactivate from the command line.
  10. To reenter the virtual environment simply execute source env/bin/activate again from inside the Pi-Plates folder.

Yes it's a bit awkward but it does avoid some of the issues caused by the pip utility.

There IS another option however. You can choose to ignore the rational of PEP 668 and install the Pi-Plate modules without having to operate in a virtual environment by adding an additional argument to the pip command: pip install --break-system-packages Pi-Plates . After that, you can run your code as before without jumping in and out of a virtual environment.