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

Installing enviroplus-python library and running lcd.py does not work #128

Closed
gardiner opened this issue Nov 18, 2023 · 3 comments
Closed

Comments

@gardiner
Copy link

After installing enviroplus-python library as described in the documentation the lcd.py example fails with an error 'int' object is not iterable'.

The reason is that the used ST7735 library has had a breaking change (see pimoroni/st7735-python#32 for details).

Until the code in this repository is fixed you can solve the problem like this:

  • uninstall ST7735 library (e.g. pip uninstall st7735)
  • clone ST7735 repository (e.g. git clone https://github.com/pimoroni/st7735-python.git)
  • checkout commit before introducing breaking change (e.g. git checkout c0733d6)
  • install that version (e.g. pip install library/)

Note: If you are using a newer Pi OS using python virtual environments, you have to remember that su - and sudo do not respect a previously selected venv, so whenever you switch between the normal user and root, you have to make sure you activate the venv again.

@Lipod
Copy link

Lipod commented Nov 21, 2023

While the permanent fix is to update the examples in this repository, I just wanted to suggest a simpler workaround as noted here:

pip install st7735==0.0.5

This pins the st7735 library to the newest version prior to the breaking changes. Once the examples here are updated, you can just run pip install --upgrade st7735 and it should pull down the latest version again. There may be older versions available for any other similarly affected libraries, but I haven't personally checked.

@Gadgetoid
Copy link
Member

The updated examples are in an open pull request, you should use the library and examples from there until it's released/merged... probably something I should just do ASAP, but I'd hoped to get some feedback on it first -

See: #126

@helgibbons
Copy link
Contributor

Closing this one now that these changes are released/merged.

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

4 participants