so I’m trying to set up an inky impression with a raspberry pi 3, however, my pip install commends don’t work and I have to use the --break-system-packages or other commends to override it, which doesn’t help with the installation curl function that is given to install everything. is there a way to override this or fix the error?
Thanks!
Have a look at this.
How to solve “error: externally-managed-environment” when installing via pip3 | Jeff Geerling
It’s not recommended and a do so at your own risk. That being said I did the
sudo rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED
At my age I just don’t have the patience to mess around and jump through all those hoops to get the virtual environment functional.
hel
May 29, 2024, 11:09am
3
If you install from this branch the installer should set up a virtual environment for you:
pimoroni:main
← pimoroni:gpiod
opened 01:51PM - 21 Nov 23 UTC
Hey ho, we're in the process of transitioning the Inky library and examples to g… piod, virtual environments and the shiny new Pi 5.
As such, I'd really like your feedback!
## Progress
* [ ] inky - old 2nd generation, 2/3-colour Inky pHAT boards and wHAT boards - **(yellow) pHAT works, other untested**
* [ ] inky_ssd1608 - newer Inky pHAT boards based on the SSD1608 - **(red) pHAT works, others untested**
* [x] inky_ssd1683 - newer Inky wHAT boards - :tada: **seems to work for me on my Pi 5.** (SEE BELOW)
* [x] inky_uc8159 - Inky Impressions 4 - **it works!** (SEE BELOW)
* [x] inky_uc8159 - Inky Impressions 5.7" - **it works!** (SEE BELOW)
* [x] inky_ac073tc1a - Inky Impressions 7.3" - **It works!**
Note: Most examples using GPIO *have not* been ported, with the exception of `examples/7color/buttons.py`.
Note: The simulator might be broken. I am removing conditional imports and custom `ImportError` trapping where I can, since this overcomplicates the codebase *especially* when we try to move to gpiod.
## 👉 Installation Instructions 👈
Grab this branch and install with the `--unstable` (local downloaded copy of the library) flag:
```
git clone https://github.com/pimoroni/inky -b gpiod
cd inky
./install.sh --unstable
```
A venv *should* be created for you, though this step will be skipped if you're already inside one (in theory).
If you get errors, make sure you activate that virtual environment. Your bash prompt should start with `(pimoroni)`:
```
source ~/.virtualenvs/pimoroni/bin/activate
```
The installer should have added some new lines to `/boot/firmware/config.txt` so that SPI gets out of the way of the chip-select pin and the EEPROM i2c is enabled (for detecting your Inky board type)-
```
dtoverlay=spi0-0cs
dtoverlay=i2c1
dtoverlay=i2c1-pi5
```
Reboot your Pi, and see if anything breaks.
### Things to look out for:
1. Any errors writing `/boot/firmware/config.txt` and that the lines mentioned above are present
2. Make sure `/boot/config.txt` is still a symlink to `/boot/firmware/config.txt` - I think `sed` breaks this horribly (Note: On my Pi it now seems like this is *not* a symlink on purpose?)
3. Examples and such are copied to `~/Pimoroni`
4. No missing packages or heinous compile steps during install
5. Your product actually works!
### Inky wHAT (ssd1683)
Tested before the `dtoverlay=spi0-0cs` change, which worked, but this broke SSD1683 because it was using the default SPI chip-select behaviour. I have migrated everything over to use soft chip-select, though it might be worth seeing if we can give it over to the SPI driver on all counts and avoid needing to load that overlay.
### Inky Impressions 5.7"
I've been having trouble with this, and I'm still suspicious but it seems to now be working-
```
PYTHONPATH=../../ python3 image.py --type 7colour --file images/inky-4.0-redchain.jpg
```
I have a test board with no EEPROM data, so it blurts out:
```
Detected None
Failed to detect an Inky board. Trying --type/--colour arguments instead...
/home/phil/Development/pi/inky/inky/inky_uc8159.py:242: UserWarning: SPI: Cannot disable chip-select!
warnings.warn("SPI: Cannot disable chip-select!")
/home/phil/Development/pi/inky/inky/inky_uc8159.py:337: UserWarning: Busy Wait: Held high. Waiting for 1.00s
warnings.warn(f"Busy Wait: Held high. Waiting for {timeout:0.2f}s")
/home/phil/Development/pi/inky/inky/inky_uc8159.py:337: UserWarning: Busy Wait: Held high. Waiting for 0.20s
warnings.warn(f"Busy Wait: Held high. Waiting for {timeout:0.2f}s")
/home/phil/Development/pi/inky/inky/inky_uc8159.py:337: UserWarning: Busy Wait: Held high. Waiting for 32.00s
warnings.warn(f"Busy Wait: Held high. Waiting for {timeout:0.2f}s")
```
This may have been another SPI chip-select issue.
### Inky Impressions 4"
My 4" proto has no EEPROM data flashed, so I modified `stripes.py` as follows:
```python
#!/usr/bin/env python3
# To simulate:
# from inky.mock import InkyMockImpression as Inky
#from inky.auto import auto
from inky.inky_uc8159 import Inky
#inky = auto(ask_user=True, verbose=True)
inky = Inky((640, 400))
for y in range(inky.height - 1):
color = y // (inky.height // 7)
for x in range(inky.width - 1):
inky.set_pixel(x, y, color * 0x11)
inky.show()
# To simulate:
# inky.wait_for_window_close()
```
Our software team would love to know if you run into any issues with the updated installer.