首页 > 代码库 > ubuntu下安装python各类运维用模块(经常补充)

ubuntu下安装python各类运维用模块(经常补充)

环境:ubuntu 16.04LTS,python3,python2

已安装:pip3,pip2

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 ipypip install ipy
# import IPy

4.dnspython

pip3 install dnspythonpip 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

# 先安装pycryptosudo pip3 install pycrypto# 再安装paramikosudo pip3 install paramiko#  import paramiko验证

9.

 

ubuntu下安装python各类运维用模块(经常补充)