Envirophat - empty install / module path for python

Hi, all,

trying to get my first sensor on RPi 3 B+ with Raspbian running - it started out with some errors at the very beginning…

  1. run: curl https://get.pimoroni.com/envirophat | bash

  2. also run install scripts over pimoroni dashboard or python3 and python seperately

  3. in python: “from envirophat import light” results in “module not found”

  4. in usr/local/lib/pythonX.X/dist-packages is NO directory for envirophat

what is missing?

am i right that it is for installing steps not necessary to have the envirophat already attached to the Pi?

Olli

This is odd, Enviro pHAT is of the packages shipped with Raspbian- as in, it’s already installed and ready to go from the moment you install the OS!

You could try:

sudo apt update
sudo apt install --reinstall python-envirophat python3-envirophat

And see if that restores it.

still it is odd…

for more detail after running it with Thonny 2.1.16

Python 3.5.3 (/usr/bin/python3)

%Debug all.py
Traceback (most recent call last):
File “/home/pi/Pimoroni/envirophat/examples-old/all.py”, line 6, in
from envirophat import light, weather, motion, analog
ImportError: No module named ‘envirophat’

As you can see on “examples_old” I already tried several times installing enviro pHAT…

Perhaps one more hint?

it is not odd anymore…

as it is with beginners, they are a little…

I used your command lines the wrong way
(“sudo apt install” instead of “sudo apt install --reinstall python-envirophat python3-envirophat” because of the font color)

now, it runs :)

Thanks a lot for your help!

1 Like

D’oh! The code formatting makes that bit look like a comment and really low contrast! Glad you’re up and running.