Warning: Could not check Python dependencies because this script is not running as librenms

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

Component Version
LibreNMS 21.11.0
DB Schema 2021_10_20_224207_increase_length_of_attrib_type_column (224)
PHP 7.4.25
Python 3.6.8
MySQL 10.5.13-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

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

[OK] Composer Version: 2.1.11
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
[FAIL] Python3 module issue found: 'Required packages: [‘PyMySQL!=1.0.0’, ‘python-dotenv’, ‘redis>=3.0’, ‘setuptools’, ‘psutil>=5.6.0’, ‘command_runner>=1.3.0’]
Package not found: The ‘command_runner>=1.3.0’ distribution was not found and is required by the application

[FIX]:
pip3 install -r /opt/librenms/requirements.txt

[librenms@none ~]$ pip3 install -r /opt/librenms/requirements.txt
Requirement already satisfied: PyMySQL!=1.0.0 in ./.local/lib/python3.6/site-packages (from -r /opt/librenms/requirements.txt (line 1))
Requirement already satisfied: python-dotenv in ./.local/lib/python3.6/site-packages (from -r /opt/librenms/requirements.txt (line 2))
Requirement already satisfied: redis>=3.0 in ./.local/lib/python3.6/site-packages (from -r /opt/librenms/requirements.txt (line 3))
Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages (from -r /opt/librenms/requirements.txt (line 4))
Collecting psutil>=5.6.0 (from -r /opt/librenms/requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/e1/b0/7276de53321c12981717490516b7e612364f2cb372ee8901bd4a66a000d7/psutil-5.8.0.tar.gz
Collecting command_runner>=1.3.0 (from -r /opt/librenms/requirements.txt (line 6))
Using cached https://files.pythonhosted.org/packages/e1/93/1e38da0b691435caa09378d6beaf6834986392b931c053fc8927085aa571/command_runner-1.3.0-py3-none-any.whl
Installing collected packages: psutil, command-runner
Running setup.py install for psutil … error
Complete output from command /usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-3b0_1gh5/psutil/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-5ytpn09j-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/psutil
copying psutil/_pswindows.py → build/lib.linux-x86_64-3.6/psutil
copying psutil/_psbsd.py → build/lib.linux-x86_64-3.6/psutil
copying psutil/_compat.py → build/lib.linux-x86_64-3.6/psutil
copying psutil/_common.py → build/lib.linux-x86_64-3.6/psutil
copying psutil/_psposix.py → build/lib.linux-x86_64-3.6/psutil
copying psutil/init.py → build/lib.linux-x86_64-3.6/psutil
copying psutil/_psaix.py → build/lib.linux-x86_64-3.6/psutil
copying psutil/_pslinux.py → build/lib.linux-x86_64-3.6/psutil
copying psutil/_pssunos.py → build/lib.linux-x86_64-3.6/psutil
copying psutil/_psosx.py → build/lib.linux-x86_64-3.6/psutil
creating build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_aix.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_system.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_testutils.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_bsd.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_connections.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_memleaks.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_unicode.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_posix.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_windows.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_misc.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_sunos.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/init.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_osx.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_process.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_linux.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/main.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/test_contracts.py → build/lib.linux-x86_64-3.6/psutil/tests
copying psutil/tests/runner.py → build/lib.linux-x86_64-3.6/psutil/tests
running build_ext
building ‘psutil._psutil_linux’ extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/psutil
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_LINUX=1 -I/usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command ‘gcc’ failed with exit status 1

----------------------------------------

Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-3b0_1gh5/psutil/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-5ytpn09j-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-3b0_1gh5/psutil/

Did you try to googling this error?
gcc - fatal error: Python.h: No such file or directory - Stack Overflow

1 Like

Thanks, it’s fixed.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.