Windows下Python环境搭建Win7 64位setuptools文档格式.docx
《Windows下Python环境搭建Win7 64位setuptools文档格式.docx》由会员分享,可在线阅读,更多相关《Windows下Python环境搭建Win7 64位setuptools文档格式.docx(15页珍藏版)》请在冰豆网上搜索。
//www.python.org/getit/
版本:
python-2.7.3.amd64.msi
setuptools:
//pypi.python.org/pypi/setuptools#windows
ez_setup.py文件:
numpy:
//www.lfd.uci.edu/~gohlke/pythonlibs/
numpy-unoptimized-1.6.2.win-amd64-py2.7.exe
2.安装Python
选择安装路径:
除了选择安装路径外,其他的基本都可以默认了,一直到安装完成。
此时的目录结构如下:
3为Python配置环境变量
测试,Python安装成功。
4.安装setuptools
官网声称.exe版本的不支持64位Windows系统,推荐使用ez_setup.py自动安装。
据说,有筒子32位的exe文件在64位系统上也能用,我就不试了,按照官方的指导来吧,免得以后出些莫名其妙的问题。
打开
ez_setup.rar(3.78KB,下载次数:
1,售价:
1金子)
在命令行窗口下执行即可,前提是可以联网。
1.D:
\>
ez_setup.py
2.Downloadinghttp:
//pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
3.Processingsetuptools-0.6c11-py2.7.egg
4.Copyingsetuptools-0.6c11-py2.7.eggtod:
\python27\lib\site-packages
5.Addingsetuptools0.6c11toeasy-install.pthfile
6.Installingeasy_install-script.pyscripttoD:
\Python27\Scripts
7.Installingeasy_install.exescripttoD:
8.Installingeasy_install.exe.manifestscripttoD:
9.Installingeasy_install-2.7-script.pyscripttoD:
10.Installingeasy_install-2.7.exescripttoD:
11.Installingeasy_install-2.7.exe.manifestscripttoD:
12.
13.Installedd:
\python27\lib\site-packages\setuptools-0.6c11-py2.7.egg
14.Processingdependenciesforsetuptools==0.6c11
15.Finishedprocessingdependenciesforsetuptools==0.6c11
复制代码
setuptools安装完成后的目录如下:
5.为setuptools配置环境变量
6.使用easy_install
安装django:
1.C:
\Users\Biao>
easy_install
2.error:
Nourls,filenames,orrequirementsspecified(see--help)
3.
4.C:
easy_installdjango
5.Searchingfordjango
6.Readinghttp:
//pypi.python.org/simple/django/
7.Reading
8.Reading
9.Bestmatch:
Django1.4.2
10.Downloading
11.ProcessingDjango-1.4.2.tar.gz
12.RunningDjango-1.4.2\setup.py-qbdist_egg--dist-dirc:
\users\biao\appdata\local\temp\easy_install-tahhsu\Django-1.4.2\egg-dist-tmp-0hpiac
13.zip_safeflagnotset;
analyzingarchivecontents...
14.django.contrib.admindocs.views:
modulereferences__file__
15.django.contrib.auth.tests.context_processors:
16.django.contrib.auth.tests.forms:
17.django.contrib.auth.tests.views:
18.django.contrib.flatpages.tests.csrf:
19.django.contrib.flatpages.tests.middleware:
20.django.contrib.flatpages.tests.templatetags:
21.django.contrib.flatpages.tests.views:
22.django.contrib.formtools.tests.__init__:
23.django.contrib.formtools.tests.wizard.namedwizardtests.tests:
24.django.contrib.formtools.tests.wizard.wizardtests.tests:
25.django.contrib.gis.geometry.test_data:
26.django.contrib.gis.tests.geo3d.tests:
27.django.contrib.gis.tests.geogapp.tests:
28.django.contrib.gis.tests.layermap.tests:
29.django.contrib.sitemaps.tests.base:
30.django.contrib.staticfiles.storage:
31.django.core.management.sql:
32.django.core.management.templates:
modulereferences__path__
33.django.core.management.__init__:
34.django.core.management.__init__:
35.mands.loaddata:
36.mands.loaddata:
37.mands.makemessages:
38.django.core.servers.basehttp:
39.django.db.utils:
40.django.db.models.loading:
41.django.template.loaders.app_directories:
42.django.test._doctest:
43.django.test._doctest:
moduleMAYbeusinginspect.getsourcefile
44.django.utils.autoreload:
45.django.utils.module_loading:
46.django.utils.version:
47.django.utils.translation.trans_real:
48.django.utils.translation.__init__:
49.django.utils.unittest.collector:
50.django.utils.unittest.loader:
51.django.views.i18n:
52.Addingdjango1.4.2toeasy-install.pthfile
53.Installingdjango-admin.pyscripttoD:
54.
55.Installedd:
\python27\lib\site-packages\django-1.4.2-py2.7.egg
56.Processingdependenciesfordjango
57.Finishedprocessingdependenciesfordjango
58.
59.C:
python
60.Python2.7.3(default,Apr102012,23:
24:
47)[MSCv.150064bit(AMD64)]onwin32
61.Type"
help"
"
copyright"
credits"
or"
license"
formoreinformation.
62.>
>
importdjango
63.>
exit()
django已安装成功。
安装numpy:
easy_installnumpy
2.Searchingfornumpy
3.Readinghttp:
//pypi.python.org/simple/numpy/
4.Readinghttp:
//numpy.scipy.org
5.Reading
//numeric.scipy.org
7.Bestmatch:
numpy1.6.2
8.Downloadinghttp:
//pypi.python.org/packages/source/n/numpy/numpy-1.6.2.zip#md5=7e13c931985f90efcfa0408f845d6fee
9.error:
MD5validationfailedfornumpy-1.6.2.zip;
possibledownloadproblem?
10.
11.C:
easy-install方式安装失败,这是因为我公司限网了,下载不下了。
改用exe文件安装,安装文件为:
numpy-unoptimized-1.6.2.win-amd64-py2.7.exe。
下载完成后直接运行就可以了:
默认会找到Python的安装路径:
numpy安装成功。
至此,在Windows下Python环境搭建完成。