环境:ubuntu 16.04LTS,python3,python2
已安装:pip3,pip2
注:基于Python自动化运维这本书上介绍的各模块而来。
1.python-rrdtool(just for python2)
sudo apt-get install python-rrdtool -y
# import rrdtool
2.psutil
pip3 install psutil
pip install psutil
# import psutil
3.ipy
pip3 install ipy
pip install ipy
# import IPy
4.dnspython
pip3 install dnspython
pip install dnspython
# import dns.resolver
5.difflib(系统自带)
# import difflib
6.scapy #有问题
pip3 install scapy
# import scapy
7.mysql
apt-get install python-mysqldb
apt-get install python3-mysqldb
# import MySQLdb
发现用了pip安装后越来越懒了,都是用的最简单的方法
8.paramiko
# 先安装pycrypto
sudo pip3 install pycrypto
# 再安装paramiko
sudo pip3 install paramiko
# import paramiko验证
9.pyclamad(开源杀毒,可由python直接调用)
10.python-nmap
sudo apt-get install python3-nmap
sudo apt-get install python-nmap
# import nmap