Why Python library import doesn't work via NRPE

115 Views Asked by At

I'm developing plugin Nrpe in Python.

When i try to execute my code it works well on my machine. But when the NRPE execute it, an error occurs : 'No Module named pycurl'

I'm working on CentOs6.10 with Python 3.4 and i've installed pycurl with easy-install, the path to pycurl.py is /usr/lib/python3.4/site-packages//usr/lib/python3.4/site-packages/pycurl.py

And my PYTHONPATH = ['/usr/local/bin', '/usr/lib64/python34.zip', '/usr/lib64/python3.4', '/usr/lib64/python3.4/plat-linux', '/usr/lib64/python3.4/lib-dynload', '/usr/lib64/python3.4/site-packages', '/usr/lib/python3.4/site-packages']

I hope somebody could help me ?

Thanks !

1

There are 1 best solutions below

3
dstromberg On

You probably need something like: python3 -m pip install pycurl

You may want to use: python3 -m pip install --user pycurl or a virtual environment.

pycurl doesn't come with python. You have to install it with pip from pypi.