python安装不说了
ipython安装时要安装两个文件:
1.ipython
2.pyreadline-1.5-win32-setup.exe
或者有个工具:Easy Install /http://peak.telecommunity.com/DevCenter/EasyInstall
安装好后如果要安装Ipython,就直接执行easy_install ipython
安装Django:
下载后直接解压复制到python下的site-packages里,我试了下,没弄好
还有另外一种方法:
python setup.py install

如果在python里输入import django么有提示ImportError就ok了~~

django-admin.py startproject mysit
cd mysite
dir

.\manage.py runserver
这时就可以访问了
访问后提示
[25/Oct/2010 10:52:04] "GET / HTTP/1.1" 200 2053
log从左到右有4个部分:时间戳、请求、HTTP状态码,以及字节数。
状态码404表示Not Found是因为项目没有定义任何url~我的显示200,why?

3.安装MySQLdb



一直下载的是tgz的包,没看明白windows下怎么安装,后来从这里找到了msi的安装文件
http://blog.csdn.net/sding/archive/2009/12/15/5012236.aspx
下载 MySQL-python-1.2.3c1.win32-py2.6.exe 安装,然后import MySQLdb
我的没有出现问题,不过转可能会出现的两个问题及解决

Python 版本:2.6
下载地址:http://www.python.org/download/releases/2.6.1/
下载msi文件并安装

MySQLdb版本: MySQL-python-1.2.2.win32-py2.6.exe
下载地址:http://home.netimperia.com/files/misc/MySQL-python-1.2.2.win32-py2.6.exe
参见:http://sourceforge.net/forum/forum.php?thread_id=2316047&forum_id=70460

常见问题:
1.ImportError: DLL load failed: 找不到指定的模块。
—————————————————————————————————-
D:\Program Files\Python2.6>python
Python 2.6.1 (r261:67517, Dec  4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import MySQLdb
Traceback (most recent call last):
  File “<stdin>”, line 1, in <module>
  File “D:\Program Files\Python2.6\Lib\site-packages\MySQLdb\__init__.py”, line 19, in <module>

    import _mysql
ImportError: DLL load failed: 找不到指定的模块。
—————————————————————————————————-
解决方法:下载libmmd.dll(附件)和libguide40.dll(附件)两个dll文件并复制到python安装目录的Lib\site-packages下。
参见:http://sourceforge.net/forum/message.php?msg_id=5613887

2.ImportError: DLL load failed: 找不到指定的模块。
—————————————————————————————————-
D:\Program Files\Python2.6>python
Python 2.6 (r26:66721, Oct  2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import MySQLdb
D:\Program Files\Python2.6\lib\site-packages\MySQLdb\__init__.py:34: DeprecationWarning: the sets module is deprecated
  from sets import ImmutableSet
—————————————————————————————————-
解决方法:
1) file “__init__”, replace: 
 
from sets import ImmutableSet  
class DBAPISet(ImmutableSet):  
 
with  
 
class DBAPISet(frozenset) 
 
2) file “converters.py”, remove: 
 
from sets import BaseSet, Set 
 
3) file “converters.py”, change “Set” by “set” (IMPORTANT: only two places): 
 
line 48: return set([ i for i in s.split(',') if i ]) 
line 128: set: Set2Str, 
参见:http://sourceforge.net/forum/message.php?msg_id=5808948

附件:
libguide40.dll.zip(77.3 KB)
libmmd.dll.zip(169 KB)
libmySQL.dll.zip(861 KB)

 
原文: http://www.3gmatrix.cn/4/viewspace-16757.html


到这一步后
manage.py syncdb提示“Can't connect to MySQL server on 'localhost'”,需要安装MySQL并启动
然后manage.py syncdb提示“Unknown database 'first_python_site'”
python报错“Unknown database 'first_python_site'”,提示mysql里没有名叫first_python_site的库,打开mysql 创建库:mysql> CREATE DATABASE first_python_site; D:\firstsite> python manage.py syncdb 成功了的话django会提示创建firstsite项目的管理系统数据,敲入yes,然后创建管理员账号。