Python Library module installation __linux in Linux environment

Source: Internet
Author: User

To deploy a Python script on an online server today, the use of mysqldb, a variety of attempts to download the source code (a variety of dependent libraries are incompatible), Get/yum (this linux is really pure ah these two can not be used) installation, wget download RPM package also not even on the extranet, have failed, and Libmysqlclient-dev and Mysql-python are not very easy to find, there are many versions, but also various versions incompatible.

Finally found the available version is

ftp://rpmfind.net/linux/centos/6.6/os/x86_64/Packages/MySQL-python-1.2.3-0.3.c1.1.el6.x86_64.rpm

And

Http://archive.debian.net/zh-cn/etch/amd64/libmysqlclient15-dev/download

Wget the two packages to a server, alien the Deb format to RPM, Rsync-avzp the two RPM packages to the online server, and then rpm-ivh them in sequence, OK


Then found Redis-python also did not, this time to take the same way to die, installation redis-py rely on Redis rely on rpm-helper rely on system-units ... It's endless.

And in the rpmfind down these rpm not a success, not rely on the library is not the version to >=.

Two ways to install the software, a road has been desperate to change to compile the source of the decision:

Download redis-py-2.7.1.tar.gz:

Http://download.chinaunix.net/down.php?id=44261&ResourceID=13387&site=1

TAR-XVF, and then the CD goes in make, yes, make install is right. Import Redis in Python try, or yes. Yes, looks like it's done.

Reference: http://blog.csdn.net/javastart/article/details/40425951



Then install Memcache

Open wget ftp://ftp.tummy.com/pub/python-memcached/python-memcached-1.53.tar.gz and unzip into directory python setup.py install


Reference: The Deb format converted to RPM format under Inux environment


Original: http://blog.163.com/hklxh89@126/blog/static/884868712013224033518/

Convert the Deb format to the RPM format using the Alien tool

Alien_8.87.tar.gz

Download alien_8.87.tar.gz

[Root@mysqlnode2 ~]# wget http://ftp.de.debian.org/debian/pool/main/a/alien/alien_8.87.tar.gz

[Root@mysqlnode2 ~]# tar zxvf alien_8.87.tar.gz

[Root@mysqlnode2 ~]# CD Alien

[Root@mysqlnode2 alien]# Perl makefile.pl

[Root@mysqlnode2 alien]# make

[Root@mysqlnode2 alien]# make install

Convert Libnet0-dev_1.0.2a-7_i386.deb to libnet0-dev-1.0.2a-8.i386.rpm

[Root@mysqlnode2 ~]# alien-r Libnet0-dev_1.0.2a-7_i386.deb

warning:skipping Conversion of scripts in package Libnet0-dev:postinst Prerm

Warning:use the--scripts parameter to include the scripts.

LIBNET0-DEV-1.0.2A-8.I386.RPM generated

Install the RPM package

[Root@mysqlnode2 ~]# RPM-IVH libnet0-dev-1.0.2a-8.i386.rpm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.