tpyo kingg
Posts: 562
Joined: Mon Apr 09, 2018 5:26 pm
Location: N. Finland

not finding inkyphat on buster

Sun Jul 07, 2019 1:02 pm

I have a script I've brought over from stretch to buster. However, it is not finding the inkyphat module in buster. The module can't be found manually either: Below is the result of using the python3 interpreter to try to import the module alone.

Where have I taken a wrong turn?

Code: Select all

$ head -n 1 /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"

$ apt-cache policy python3-inkyphat | head -n 3
python3-inkyphat:
  Installed: 1.0.1
  Candidate: 1.0.1
 
$ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import inkyphat
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/inkyphat/__init__.py", line 24, in <module>
    _panel = inky212x104.Inky212x104(resolution=(HEIGHT, WIDTH), h_flip=False, v_flip=True)
  File "/usr/lib/python3/dist-packages/inkyphat/inky212x104.py", line 111, in __init__
    self._spi.open(0, self.cs_pin)
FileNotFoundError: [Errno 2] No such file or directory
>>> 

ghp
Posts: 1391
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: not finding inkyphat on buster

Sun Jul 07, 2019 1:28 pm

The error message does not say something like 'module not found'.
Did you enable SPI on the new distribution, use "sudo raspi-config" for this.

tpyo kingg
Posts: 562
Joined: Mon Apr 09, 2018 5:26 pm
Location: N. Finland

Re: not finding inkyphat on buster

Sun Jul 07, 2019 1:35 pm

ghp wrote:
Sun Jul 07, 2019 1:28 pm
The error message does not say something like 'module not found'.
Did you enable SPI on the new distribution, use "sudo raspi-config" for this.
D'oh. That was it. I have now added "enable SPI" to my notes on backup / restore for that program.

Thanks.

Return to “Python”