有关paramiko和pexpect以及MySQLdb模块,这些都是常用的,所以不应把时间浪费在安装上面。
编译安装固然不分版本,但是能不编译安装还是尽量不要编译安装。
在debian系统上如何使用apt-get来安装这些模块呢:
1.查看软件包名
[email protected]:~# apt-cache search mysql | grep python python-logilab-common - useful miscellaneous modules used by Logilab projects python-migrate - Database schema migration for SQLAlchemy python-mysql.connector - pure Python implementation of MySQL Client/Server protocol python-nova - OpenStack Compute - libraries python-drizzle - Python binding to libdrizzle python-drizzle-dbg - Python binding to libdrizzle - debug symbols python3-drizzle - Python3 binding to libdrizzle python3-drizzle-dbg - Python3 binding to libdrizzle - debug symbols python-mysqldb - Python interface to MySQL python-mysqldb-dbg - Python interface to MySQL (debug extension) python-pysqlite2 - Python interface to SQLite 3 python-storm - object-relational mapper (ORM) for Python python-storm-dbg - object-relational mapper (ORM) for Python - debugging files
[email protected]:~# apt-cache search pexpect python-pexpect - Python module for automating interactive applications [email protected]:~# apt-cache search paramiko bzr - easy to use distributed version control system bzr-doc - easy to use distributed version control system (documentation) python-bzrlib - distributed version control system - python library python-paramiko - Make ssh v2 connections with Python
2.安装
[email protected]:~# apt-get -y install python-mysqldb python-pexpect python-paramiko
这样只需简单的几条指令,远远比通过源码包安装感觉更好。
时间: 2025-01-20 01:57:19