Python-mysqldb Interface Program Installation

Source: Internet
Author: User

CentOS 7,python2.7 installs Python-mysqldb because it is minimized and relies on other tools or packages during installation

[Email protected] ~]# Pipinstall Mysql-python

Error: Command "python setup.py egg_info" failed with error code 1 in/tmp/pip-build-gme83p/mysql-python/

Install the following two packages via Yum;

[email protected] ~]# Yum install Mysql-devel

[email protected] ~]# Yum Installpython-devel

installation, the following error, the need to install the GCC compiler tool,

Command "/usr/bin/python-u-C" Import setuptools, tokenize;__file__= '/tmp/pip-build-u2yiqi/mysql-python/setup.py '; f =getattr (tokenize, ' open ', open) (__file__); Code=f.read (). replace (' \ r \ n ', ' \ n '); F.close (); Exec (compile (code, __file __, ' exec ')) "Install--record/tmp/pip-iogwbl-record/install-record.txt--single-version-externally-managed-- Compile "failed with error code 1 in/tmp/pip-build-u2yiqi/mysql-python/

[[Email protected] ~] #yum Install GCC

installation Pip need to install first Setuptools
Https://pypi.python.org/pypi/setuptools  

[[Email protected] setuptools-36.0.1]# pip install Mysql-python

Collecting Mysql-python

Using Cached Mysql-python-1.2.5.zip

Installing collected Packages:mysql-python

Running setup.py Install for Mysql-python ... done


This article from "Without Your City" blog, declined reprint!

Python-mysqldb Interface Program Installation

Related Article

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.