Bananapi Python-mysql Operation Library

Source: Internet
Author: User

BANANPI Python-mysql Operation Library

1, first MySQL, Python environment installation

2, download mysql-python-1.2.3.tar.gz and unzip

Tar Xfz mysql-python-1.2.3.tar.gz

3, vi setup_posix.py Edit configuration

Remove Comment: Mysql_config.path = "/usr/local/mysql/bin/mysql_config"

Whereis mysql_config Search to corresponding path

Note: If you do not have mysql_config, you need to install Libmysqld-dev


sudo apt-get install Libmysqld-dev
sudo apt-get install Libmysqlclient-dev

4. Switch to the mysql-python-1.2.3 directory

sudo python setup.py build

Tip Importerror:no module named Setuptools error,

Installing Setuptools-3.2.zip Decompression

sudo unzip Setuptools-3.2.zip

Switch to the setuptools-3.2 directory

sudo python setup.py build
sudo python setup.py install

5. Perform fourth steps sudo python setup.py build
Appears Error:command ' GCC ' failed with exit status 1

sudo apt-get install Python-dev Libevent-dev
sudo apt-get install Libevent-dev

And then in the fourth step of execution

>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>
CentOS Python installation Mysql-python package
Execute commands: sudo yum install Mysql-python

Bananapi Python-mysql Operation Library

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.