Recorder issue with Postgres

I am facing an issue with setting up recorder with a remote Postgres connection.

The error log keeps showing this:

2020-03-30 09:04:41 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: No module named ‘psycopg2’ (retrying in 3 seconds)

However, the module is definitely installed:

homeassistant@rpi01:~/.homeassistant $ pip3 list
Package Version


asn1crypto 0.24.0
bluepy 1.3.0
certifi 2018.8.24
chardet 3.0.4
cryptography 2.6.1
entrypoints 0.3
fail2ban 0.10.2
idna 2.6
keyring 17.1.1
keyrings.alt 3.1.1
pip 18.1
psycopg2 2.8.4
pycrypto 2.6.1
PyGObject 3.30.4
pyinotify 0.9.6
python-apt 1.8.4.1
pyxdg 0.25
requests 2.21.0
SecretStorage 2.3.1
setuptools 40.8.0
six 1.12.0
ssh-import-id 5.7
systemd-python 234
urllib3 1.24.1
wheel 0.32.3

Any ideas or pointers?

Cheers, Leo

Have checked pyvenv.cnf

home = /usr/bin
include-system-site-packages = false
version = 3.7.3

Also HA UI shows Python3

os_name	Linux
os_version	4.19.113-v7+
python_version	3.7.3

Which is why this is error is totally confusing me.

Did you resolve the problem? I have the exact same.

Unfortunately not resolved :frowning:

No idea as the error is totally misleading as the module is definitely installed.

1 Like

I’m getting the same error after going to python 3.9.0 from 3.7.3, if I fix it I’ll let you know what I did

I have the same problem. I have the python version 3.7.3