一、下載\安裝\配置
1. python3
首先,我們需要下載Python3,當前最新版本是python3.2,下載地址是
http://www.bkjia.com/down/html/46818.html
安裝過程就不用說了,默認安裝到C:\Python32目錄中。
安裝好後,將安裝目錄C:\Python32添加到環境變量中。然後打開命令提示符窗口,輸入python,如果能返回python版本說明安裝成功以及環境變量設置成功。
C:\>python Python 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
2. MySQL
然後需要下載MySQL,MySQL有很多種類型的版本,這裡我們選擇MySQL Community Server,最新版本5.5.25a
下載地址:http://www.bkjia.com/down/html/46221.html
安裝過程有點復雜,可以參考MySQL安裝圖解:
http://www.bkjia.com/down/html/28188.html
注意,務必將MySQL的編碼設成utf8
安裝完成後需要對MySQL配置,這裡我配置其用戶名為root,密碼Welcome123。
使用命令登錄mysql,安裝成功
C:\>mysql -u root -p Enter password: ********** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10 Server version: 5.5.25a MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
這裡我們創建一個名為txw1958的數據庫。
mysql> create database txw1958; Query OK, 1 row affected (0.03 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | | txw1958 | +--------------------+ 6 rows in set (0.00 sec)
3. MySQL-python模塊
MySQL-python是MySQL用於python的數據庫接口。目前支持python2.7和python3.2。
最火軟件站提供的下載地址是:http://www.bkjia.com/down/html/mysql-python.html