1、系统环境电脑型号 联想 ThinkPadT410 笔记本电脑操作系统 Windows 7 旗舰版 64 位 SP1 (DirectX 11 )处理器 英特尔 Core i5 M560 2.67GHz 双核笔记本处理器主板 联想 2522NT7 (英特尔 QM57 芯片组)内存 6 GB ( 尔必达 DDR31067MHz / 尔必达 DDR3 1333MHz )1.下载Python:地址:http:/www.python.org/getit/版本:python-2.7.3.amd64.msisetuptools:http:/pypi.python.org/pypi/setuptools#win
2、dowsez_setup.py文件:http:/ Python选择安装路径:除了选择安装路径外,其他的基本都可以默认了,一直到安装完成。此时的目录结构如下:3为 Python配置环境变量测试,Python 安装成功。4.安装 setuptools官网声称.exe 版本的不支持 64位 Windows系统,推荐使用 ez_setup.py自动安装。据说,有筒子 32位的 exe文件在 64位系统上也能用,我就不试了,按照官方的指导来吧,免得以后出些莫名其妙的问题。打开 http:/ ez_setup.py,也可以下载: ez_setup.rar (3.78 KB, 下载次数 : 1, 售价 :
3、1 金子 ) 在命令行窗口下执行即可,前提是可以联网。1. D:ez_setup.py2. Downloading http:/pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg3. Processing setuptools-0.6c11-py2.7.egg4. Copying setuptools-0.6c11-py2.7.egg to d:python27libsite-packages5. Adding setuptools 0.6c11 to easy-install.pth file6. Ins
4、talling easy_install-script.py script to D:Python27Scripts7. Installing easy_install.exe script to D:Python27Scripts8. Installing easy_install.exe.manifest script to D:Python27Scripts9. Installing easy_install-2.7-script.py script to D:Python27Scripts10.Installing easy_install-2.7.exe script to D:Py
5、thon27Scripts11.Installing easy_install-2.7.exe.manifest script to D:Python27Scripts12.13.Installed d:python27libsite-packagessetuptools-0.6c11-py2.7.egg14.Processing dependencies for setuptools=0.6c1115.Finished processing dependencies for setuptools=0.6c11复制代码setuptools安装完成后的目录如下:5.为 setuptools配置环
6、境变量6.使用 easy_install安装 django:1. C:UsersBiaoeasy_install2. error: No urls, filenames, or requirements specified (see -help)3.4. C:UsersBiaoeasy_install django5. Searching for django6. Reading http:/pypi.python.org/simple/django/7. Reading http:/ Reading http:/ Best match: Django 1.4.210.Downloading
7、https:/ Django-1.4.2.tar.gz12.Running Django-1.4.2setup.py -q bdist_egg -dist-dir c:usersbiaoappdatalocaltempeasy_install-tahhsuDjango-1.4.2egg-dist-tmp-0hpiac13.zip_safe flag not set; analyzing archive contents.14.django.contrib.admindocs.views: module references _file_15.django.contrib.auth.tests.
8、context_processors: module references _file_16.django.contrib.auth.tests.forms: module references _file_17.django.contrib.auth.tests.views: module references _file_18.django.contrib.flatpages.tests.csrf: module references _file_19.django.contrib.flatpages.tests.middleware: module references _file_20
9、.django.contrib.flatpages.tests.templatetags: module references _file_21.django.contrib.flatpages.tests.views: module references _file_22.django.contrib.formtools.tests._init_: module references _file_23.django.contrib.formtools.tests.wizard.namedwizardtests.tests: module references _file_24.django.
10、contrib.formtools.tests.wizard.wizardtests.tests: module references _file_25.django.contrib.gis.geometry.test_data: module references _file_26.django.contrib.gis.tests.geo3d.tests: module references _file_27.django.contrib.gis.tests.geogapp.tests: module references _file_28.django.contrib.gis.tests.
11、layermap.tests: module references _file_29.django.contrib.sitemaps.tests.base: module references _file_30.django.contrib.staticfiles.storage: module references _file_31.django.core.management.sql: module references _file_32.django.core.management.templates: module references _path_33.django.core.man
12、agement._init_: module references _file_34.django.core.management._init_: module references _path_mands.loaddata: module references _file_mands.loaddata: module references _path_mands.makemessages: module references _file_38.django.core.servers.basehttp: module references _path_39.django.db.utils: m
13、odule references _file_40.django.db.models.loading: module references _file_41.django.template.loaders.app_directories: module references _file_42.django.test._doctest: module references _file_43.django.test._doctest: module MAY be using inspect.getsourcefile44.django.utils.autoreload: module refere
14、nces _file_45.django.utils.module_loading: module references _path_46.django.utils.version: module references _path_47.django.utils.translation.trans_real: module references _file_48.django.utils.translation._init_: module references _file_49.django.utils.unittest.collector: module references _file_
15、50.django.utils.unittest.loader: module references _file_51.django.views.i18n: module references _file_52.Adding django 1.4.2 to easy-install.pth file53.Installing django-admin.py script to D:Python27Scripts54.55.Installed d:python27libsite-packagesdjango-1.4.2-py2.7.egg56.Processing dependencies fo
16、r django57.Finished processing dependencies for django58.59.C:UsersBiaopython60.Python 2.7.3 (default, Apr 10 2012, 23:24:47) MSC v.1500 64 bit (AMD64) on win3261.Type “help“, “copyright“, “credits“ or “license“ for more information.62. import django63. exit()复制代码django已安装成功。安装 numpy:1. C:UsersBiaoe
17、asy_install numpy2. Searching for numpy3. Reading http:/pypi.python.org/simple/numpy/4. Reading http:/numpy.scipy.org5. Reading http:/ possible download problem?10.11.C:UsersBiao复制代码easy-install方式安装失败,这是因为我公司限网了,下载不下了。改用 exe文件安装,安装文件为: numpy-unoptimized-1.6.2.win-amd64-py2.7.exe。下载完成后直接运行就可以了:默认会找到 Python的安装路径:numpy安装成功。 至此,在 Windows下 Python环境搭建完成。