Install MySQLdb module in Python environment

巴扎黑
Release: 2017-07-22 10:25:14
Original
1626 people have browsed it

----------------------[Installation of the MySQLdb module for python under Windows]--------- ------------

1. Check whether the MySQLdb module is installed. You can enter:

at the DOS command line >>python

  >>import MySQLdb

If no error is reported, it means it has been installed, otherwise the following error will be reported:

File "E: /python_test/SaFETY/connect_Mysql.py", LINE 2, in & LT; Module & GT #No module named MySQLdb        #MySQLdb is not installed

2. Installation;
1. Download MySQLdb: (Recommended link)

2. Execute the installation. After completion, there will be MySQLdb in the C:\Python27\Lib\site-packages path folder. At this time, run import MySQLdb under the Dos command line ( No error reported);

The above is completed! ~

The above is the detailed content of Install MySQLdb module in Python environment. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!