Installation of Mysqldb/mysql-python under Windows

Source: Internet
Author: User
Tags install django

Learning Python always encounter a variety of problems, a lot of problems I also Baidu for a long time, Google a lot, found that many people also encounter this problem;

Problem: The MySQL database is installed under the Windows System Python connection Error! What's going on?

Answer: Maybe a lot of answers are not the same if the error message mysql-python that you did not install this module with MySQL also need to install an ORM relationship mapping, the next chapter I will write another article!

Method One:

1. Install MySQL
First to the MySQL official website download files: Mysql-installer-community.msi installation process with the General EXE file, directly next;
2, Installation Mysql-python
Directly according to the link given by web.py, download the file mysql-python.tar.gz extract to any directory
Then install it under the cmd command line;
c:\...> python setup.py Install
c:\...> python setup.py bdist_wininst
Just double-click on the installation.

Method Two:

Sometimes we install Django and the environment is configured, but when we run our project, we will report such a mistake: No module named MySQL. One reason is that we didn't install MYSQLDB, which is Mysql-python

Installing Mysql-python under Windows is simple, just download the Windows installation to https://pypi.python.org/pypi/MySQL-python/1.2.4 here. or download here: http://sourceforge.net/projects/mysql-python/

The installation of Linux under MySQLdb is also very simple, we have spent a lot of time to introduce PIP. Installing MYSQLDB with PIP is also a command:

That's OK, if you don't have Pip, you can look back at this part's introduction to the PIP installation.

Basically i downloaded the connection on the file download and install the basic solution, I hope that my answer to you helpful! If you feel good, continue to pay attention, the latter will continue to write some useful articles!

Installation of Mysqldb/mysql-python under Windows

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.