S
S
sflyer2018-10-11 08:40:13
Python
sflyer, 2018-10-11 08:40:13

Zabbix - python script does not see modules, what's wrong?

You need to configure zabbix in telegram script, Ubuntu 16.04 OS, zabbix-server 3.4. From the console it works fine, delivers messages from the bot.
But if the message is sent from zabbix, then I get a send error:
" ImportError: No module named requests"
Updated the packages in the OS, updated pip and did pip install requests, pip3 install requests, but the package was already installed. Just in case after rebooted the server, but the result is the same, the error remains.
I'm not very versed in python, tell me what I did wrong in this case and where exactly should I install the requests module?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Shitskov, 2018-10-11
@sflyer

pip install requests

Install packages for the current user. You need to log in as the user running zabbix and install packages for him.

P
Puma Thailand, 2018-10-11
@opium

Run on behalf of the user zabbix script for the test

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question