Basic Environment description and installation of the current system cat /etc/debian_version 5.0.1 due to the Python version too old development requires the use of python2.7 version and requires paramiko Crypto mysqldb threadpool These modules one, install python2.71, download to the specified directory cd /optwget http://www.python.org/ftp/ PYTHON/2.7.3/PYTHON-2.7.3.TAR.BZ2 --NO-CHECK-CERTIFICATE 2, the package that needs to be installed apt-get -y install Bzip2 --force-yesapt-get -y install libc6-dev --force-yesapt-get -y install make --force-yesapt-get -y install libssl-dev --force-yesapt-get -y Install zlib1g-dev --force-yesapt-get -y install libmysqlclient15-dev3, unzip, and compile and install tar -jxvf Python-2.7.3.tar.bz2 -C /optcd Python-2.7.3 ./configure make Make install 4, test to see the python2.7 Python 2.7.3 (default, feb 11 2014, 11:38:11) [GCC 4.3.2] on linux2 Type "Help", "copyright", " Credits " or " LiceNSE " for more information. >>> to this python2.7 installation completed two, installation module 1, download Easy_ install-2.7wget --no-check-certificate http://pypi.python.org/packages/2.7/s/setuptools/ SETUPTOOLS-0.6C11-PY2.7.EGG#MD5=FE1F997BC722265116870BC7919059EA2, installation easy_install-2.7 sh SETUPTOOLS-0.6C11-PY2.7.EGG3, install the PIP tool easy_install-2.7 pip 4, first use the PIP command to query the package required to install pip search " Mysql-python "mysql-python - python interface to mysqlpip search " ThreadPool "Threadpool - easy to use object-oriented thread pool frameworkpip search "Paramiko" paramiko - ssh2 protocol library5, installation pip install PARAMIKOPIP INSTALL MYSQL-PYTHONPIP INSTALL THREADPOOL6, view installed packages pip listecdsa ( 0.13) mysql-python (1.2.5) paramiko (1.15.2) pip (7.0.1) pycrypto (2.6.1) setuptools ( 0.6RC11) threadpool (1.2.7) 7, test python2.7python 2.7.3 (default, may 31 2015, 23:54:34) [gcc 4.3.2] on linux2type "Help", "copyright", "credits" or "license" for more information.> >> import paramiko>>> import crypto>>> import mysqldb >>> import threadpool installation is OK.
This article is from the "7928217" blog, please be sure to keep this source http://7938217.blog.51cto.com/7928217/1657106
Compile and install python2.7 and related modules (debian5.0.1)