[[email protected] alertscripts]# python dingding.py
Traceback (most recent call last):
File “dingding.py”, line 4, in
import requests,json,sys,os,datetime
ModuleNotFoundError: No module named 'requests’
This is to tell you , Missing module requests
requests This module python2 No,
requests This module python3 Yes
centos install
sudo yum -y install python3-pip
Install the module
pip3 install requests
To run again pip3 Instructions , perhaps python3 perform .
Be careful
python Script
print The function does not need to add ()
python3 Need to add ()