Erreur Python3 module issue found: 'The 'redis>=3.0' distribution was not found and is required by the application'

Hello,

this morning, i have an error on PYthon3

ubuntu 18.04

====================================

Component Version
LibreNMS 1.63-41-g25330646f
DB Schema 2020_04_19_010532_eventlog_sensor_reference_cleanup (164)
PHP 7.2.24-0ubuntu0.18.04.4
Python 3.6.9
MySQL 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.10.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] Python3 module issue found: ‘The ‘redis>=3.0’ distribution was not found and is required by the application’

Can you help me ?

Thanks

Hi,

Run pip3 install -r requirements.txt

It’s perfect thanks a lot

Many thanks.
I had the same issue exactly.

The solution works fine.

Hi, worked also for me while using the ./validate.php script. However, when I check in the librenms GUI, it still says the error is there: Fail: Python3 module issue found: ‘The ‘redis>=3.0’ distribution was not found and is required by the application’

Any hints why the script results different than the GUI in librenms?

Regards
Stefan

I am getting this same error after a fresh install on Ubuntu 18.04 and following the documentation for NGINX install. When running the librenms installation step, I did notice an error about pip3 not being found. I do not see pip3 in the /opt/librenms directory. Is pip3 found somewhere else?

apt install python3-pip

Thanks! That works. That package is missing from the list of packages to install in the documentation for Ubuntu 18.04 and NGINX.

After fixing pip3 with apt and doing “pip3 install -r requirements.txt” and restarting apache, the error also remains visisble in the validate.php webpage, NOT the CLI validate.php output.

I am getting the same error on a brand new install of Ubuntu 18.04 and LibreNMS. I’ve run pip3 against the requirements.txt, it installs and the error persists:

#:/opt/librenms# su librenms
$ pip3 install -r requirements.txt
Collecting PyMySQL (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/ed/39/15045ae46f2a123019aa968dfcba0396c161c20f855f11dea6796bcaae95/PyMySQL-0.9.3-py2.py3-none-any.whl
Collecting python-dotenv (from -r requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/cb/2a/07f87440444fdf2c5870a710b6770d766a1c7df9c827b0c90e807f1fb4c5/python_dotenv-0.13.0-py2.py3-none-any.whl
Collecting redis>=3.0 (from -r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/d2/07/20cb8df2ded4b5db176a65da48b7c8d4295d868776296580b11071218a2b/redis-3.5.0-py2.py3-none-any.whl
Installing collected packages: PyMySQL, python-dotenv, redis
Successfully installed PyMySQL-0.9.3 python-dotenv-0.13.0 redis-3.5.0
# ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.63-41-g25330646f
DB Schema | 2020_04_19_010532_eventlog_sensor_reference_cleanup (164)
PHP       | 7.2.24-0ubuntu0.18.04.4
Python    | 3.6.9
MySQL     | 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 1.10.6
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[FAIL]  Python3 module issue found: 'The 'redis>=3.0' distribution was not found and is required by the application'
[WARN]  Your local git contains modified files, this could prevent automatic updates.
        [FIX]: 
        You can fix this with ./scripts/github-remove
        Modified Files:
         bootstrap/cache/.gitignore
         logs/.gitignore
         rrd/.gitignore
         storage/app/.gitignore
         storage/app/public/.gitignore
         storage/debugbar/.gitignore
         storage/framework/cache/.gitignore
         storage/framework/cache/data/.gitignore
         storage/framework/sessions/.gitignore
         storage/framework/testing/.gitignore
         storage/framework/views/.gitignore
         storage/logs/.gitignore

Thanks for the fix :slight_smile:

I have the same problem, the webinterface complains about missing redis>=3.0 but validate.php shows no error. I restarted both nginx and php7.3-fpm (debian buster).
Also, pip3 install -r requirements.txt confirms it is already installed:

$ pip3 install -r requirements.txt 
Requirement already satisfied: PyMySQL in ./.local/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (0.9.3)
Requirement already satisfied: python-dotenv in ./.local/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (0.13.0)
Requirement already satisfied: redis>=3.0 in ./.local/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (3.5.0)

If you install the requirements as root, you won’t get a web error.

However, I have a PR to disable the web check when the web server isn’t running as the poller user. As it could be inaccurate then (as you all have seen).

You have to use: sudo -H pip3 install -r requirements.txt
And all will be well in the Web page also.
If you simply do a sudo pip3 install -r requirements.txt it says so.
but it also says that “Requirement already satisfied: …”
And even more confusing if you don’t use “sudo” as a non prived user , it says:
“Successfully installed PyMySQL-0.9.3 python-dotenv-0.13.0 redis-3.5.0”

So try: “sudo -H” as suggested when running sudo without options.

my 2 cents.

1 Like

That’s the fix, many thanks.

This worked for me. Thank you.