# Help needed installing Library for SPI Colour LCD

**URL:** <https://forums.pimoroni.com/t/help-needed-installing-library-for-spi-colour-lcd/15362>\
**Category:** Support\
**Created:** [November 17, 2020, 4:35pm UTC](https://forums.pimoroni.com/t/help-needed-installing-library-for-spi-colour-lcd/15362 "2020-11-17T16:35:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Retrophile](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/retrophile/32/7286_2.png) [@Retrophile](https://forums.pimoroni.com/u/Retrophile)\
**Post date:** [November 17, 2020, 4:35pm UTC](https://forums.pimoroni.com/t/help-needed-installing-library-for-spi-colour-lcd/15362/1 "2020-11-17T16:35:51Z")

</div>

```
    I have never had any problems installing SW for previous Pimoroni products but I can't get my latest purchase (1.3" SPI Colour LCD display) to work on my new Raspberry Pi 400. I believe I have followed all the instructions given and get positive confirmation from the install process but when I try to run any of the examples I get a ModuleNotFoundError error. Since this is not a new product I expect I must be doing something wrong. After multiple tries and resets, an example session is listed below.

```

Any ideas gratefully received.

pi@raspberrypi:~ $ sudo apt-get update  
Hit:1 [Index of /debian](http://archive.raspberrypi.org/debian) buster InRelease  
Hit:2 [Index of /raspbian](http://raspbian.raspberrypi.org/raspbian) buster InRelease  
Reading package lists… Done  
pi@raspberrypi:~ $ sudo apt-get install python-rpi.gpio python-spidev python-pip python-pil python-numpy  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
python-numpy is already the newest version (1:1.16.2-1).  
python-pil is already the newest version (5.4.1-2+deb10u2).  
python-pip is already the newest version (18.1-5+rpt1).  
python-rpi.gpio is already the newest version (0.7.0-0.1~bpo10+1).  
python-spidev is already the newest version (20190221~182651-1).  
The following packages were automatically installed and are no longer required:  
libexiv2-14 libgfortran3 libgit2-27 libgmime-2.6-0 libhttp-parser2.8  
libmbedcrypto3 libmbedtls12 libmbedx509-0 libqwt-qt5-6 libssl1.0.2  
ruby-activesupport ruby-afm ruby-ascii85 ruby-atomic ruby-coderay  
ruby-concurrent ruby-ffi ruby-hamster ruby-hashery ruby-i18n ruby-kramdown  
ruby-memoist ruby-multi-json ruby-oj ruby-pdf-core ruby-pdf-reader  
ruby-prawn ruby-prawn-table ruby-rc4 ruby-rouge ruby-rugged ruby-stringex  
ruby-thread-safe ruby-ttfunk ruby-tzinfo ruby-wavefile sonic-pi-samples  
sonic-pi-server uuid-dev  
Use ‘sudo apt autoremove’ to remove them.  
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.  
pi@raspberrypi:~ $ sudo pip install st7789  
Looking in indexes: [Simple index](https://pypi.org/simple), [piwheels - Simple index](https://www.piwheels.org/simple)  
Requirement already satisfied: st7789 in /usr/local/lib/python2.7/dist-packages (0.0.2)  
pi@raspberrypi:~ $

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Python 3.7.3 (/usr/bin/python3)

> > > %Run shapes.py  
> > > Traceback (most recent call last):  
> > > File “/home/pi/Pimoroni/st7789-python-master/examples/shapes.py”, line 25, in   
> > > import ST7789  
> > > ModuleNotFoundError: No module named ‘ST7789’  
> > > %Run gif.py  
> > > Traceback (most recent call last):  
> > > File “/home/pi/Pimoroni/st7789-python-master/examples/gif.py”, line 22, in   
> > > import ST7789  
> > > ModuleNotFoundError: No module named ‘ST7789’  
> > > %cd /home/pi/Pimoroni/st7789-python-master/library/ST7789  
> > > %Run **init**.py  
> > > %cd /home/pi/Pimoroni/st7789-python-master/library  
> > > %Run setup.py

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────  
Python 3.7.3 (/usr/bin/python3)

> > > %cd /home/pi/Pimoroni/st7789-python-master/examples  
> > > %Run image.py  
> > > Traceback (most recent call last):  
> > > File “/home/pi/Pimoroni/st7789-python-master/examples/image.py”, line 24, in   
> > > import ST7789 as ST7789  
> > > ModuleNotFoundError: No module named ‘ST7789’

---

<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:** [November 17, 2020, 4:56pm UTC](https://forums.pimoroni.com/t/help-needed-installing-library-for-spi-colour-lcd/15362/2 "2020-11-17T16:56:20Z")

</div>

Make sure SPI is enabled.

> [@1.3 color tft LCD on btreakout garden pHat, SPI i2c](https://forums.pimoroni.com/t/1-3-color-tft-lcd-on-btreakout-garden-phat-spi-i2c/13033):
>
> I’m trying to get my 1.3" SPI Colour LCD (240x240) Breakout working with a Breakout Garden pHat The Breakout garden Installer didn’t find it, I had to do the manual install from here Running the scrolling-test.py example from idle3 got me a no module named st7789. Running sudo pip3 install st7789 fixed that but gets me a new error message that I think is because its plugged into the breakout garden? Traceback (most recent call last): File “/home/pi/Color LCD/scrolling-text.py”, …

---

<div class="post-metadata">

**Author:** ![lexfiend](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/lexfiend/32/7136_2.png) [@lexfiend](https://forums.pimoroni.com/u/lexfiend)\
**Post date:** [November 18, 2020, 6:47am UTC](https://forums.pimoroni.com/t/help-needed-installing-library-for-spi-colour-lcd/15362/3 "2020-11-18T06:47:45Z")

</div>

(I’ve reformatted your shell output for clarity, because the problem becomes very obvious when readability is assured. In future, please wrap such output as “Preformatted text”, by selecting the entire block and clicking on the **\</\>** icon in the editor toolbar.)

> [@Retrophile](#):
>
> ```auto
> pi@raspberrypi:~ sudo pip install st7789
> Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
> Requirement already satisfied: st7789 in /usr/local/lib/python2.7/dist-packages (0.0.2) 
> pi@raspberrypi:~
> 
> ```

It seems you installed the ST7789 module under Python _2_, but are running your scripts with Python _3_, so ModuleNotFoundErrors are to be expected.

Run:

```auto
sudo pip3 install st7789

```

then try your scripts again.

---

<div class="post-metadata">

**Author:** ![holmesha](https://avatars.discourse-cdn.com/v4/letter/h/9e8a1a/32.png) [@holmesha](https://forums.pimoroni.com/u/holmesha)\
**Post date:** [June 19, 2022, 3:27pm UTC](https://forums.pimoroni.com/t/help-needed-installing-library-for-spi-colour-lcd/15362/4 "2022-06-19T15:27:25Z")

</div>

How do you do this if you are running it off a pico? You can’t ssh into the pico, right?

---

<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:** [June 19, 2022, 4:56pm UTC](https://forums.pimoroni.com/t/help-needed-installing-library-for-spi-colour-lcd/15362/5 "2022-06-19T16:56:19Z")

</div>

If you use Pimoroni’s custom micro python uf2 file, the library is included in it and installed with it.

[Releases · pimoroni/pimoroni-pico (github.com)](https://github.com/pimoroni/pimoroni-pico/releases)

[Getting Started with Raspberry Pi Pico (pimoroni.com)](https://learn.pimoroni.com/article/getting-started-with-pico)
