一区二区三区日韩精品-日韩经典一区二区三区-五月激情综合丁香婷婷-欧美精品中文字幕专区

分享

win7(64bit)python相關(guān)環(huán)境模塊搭建

 powerbaby 2016-03-02

包括Python,eclipse,jdk,pydev,pip,setuptools,beautifulsoup,pyyaml,nltk,mysqldb的下載安裝配置。

*************************************************
python
下載:
python-2.7.6.amd64.msi
http://www./
Python 2.7.6 released
Python 2.7.6 is now available.
http://www./download/releases/2.7.6/
Windows X86-64 MSI Installer (2.7.6) [1] (sig)

 

安裝

配置:
我的電腦->屬性->高級->環(huán)境變量->系統(tǒng)變量中的PATH增加:C:\Python27;

驗(yàn)證:
在桌面建立一個(gè)文件pt.py,內(nèi)容為print 'hello python'
在cmd中輸入命令python C:\Users\***\Desktop\pt.py
***為電腦用戶名。


C:\Users\***>python C:\Users\***\Desktop\pt.py
hello python

C:\Users\***>

 

*************************************************
Eclipse:
eclipse-java-indigo-SR2-win32-x86_64.zip
http://www./downloads/
Older Versions
http://wiki./Older_Versions_Of_Eclipse
Eclipse Indigo SR2 Packages (v 3.7.2)
http://www./downloads/packages/release/indigo/sr2
Eclipse IDE for Java Developers, (128 MB)
Downloaded 1,226,421 TimesDetails Windows 32-bit  64-bit
 
http://www./downloads/download.php?file=/technology/epp/downloads/release/indigo/SR2/eclipse-java-indigo-SR2-win32-x86_64.zip
Download eclipse-java-indigo-SR2-win32-x86_64.zip from:

 

*************************************************
jdk:
jdk-7u45-windows-x64.exe
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Windows x64 125.31 MB     jdk-7u45-windows-x64.exe

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

 

*************************************************
pydev
為了在Eclipse中進(jìn)行python工程的開發(fā)。
http:///projects/pydev/files/
PyDev for Eclipse
Looking for the latest version? Download PyDev 3.2.0.zip (8.2 MB)
版本一直在更新中,幾天前是3.1.0.zip

下載完,解壓縮,將features和plugins文件夾中的內(nèi)容分別復(fù)制到eclipse的features和plugins文件夾下。
重復(fù)則替換。

具體方法見windows xp,32位,環(huán)境下,Eclipse+python平臺搭建
http://blog.sina.com.cn/s/blog_8af1069601019uaw.html
“安裝python插件”,打開eclipse先來配置preference-》PyDev-》Interpreter-Python-》New python的執(zhí)行exe文件的目錄

 

*************************************************
pip
https://pypi./pypi/pip
Download
pip-1.4.1.tar.gz
A tool for installing and managing Python packages.
解壓縮,在cmd中進(jìn)入到pip-1.4.1目錄,執(zhí)行 python setup.py install
報(bào)錯(cuò):
ImportError: No module named setuptools
所以,需要先安裝setuptools

 

*************************************************
setuptools
https://pypi./pypi/setuptools/
setuptools 2.0.2
點(diǎn)擊右側(cè)Downloads按鈕,跳至Downloads
Scroll to the very bottom of the page to find the links.
需要到頁面底部去找鏈接下載。

File Type Py Version Uploaded on Size
setuptools-2.0.2-py2.py3-none-any.whl (md5)  Python Wheel  3.4 2013-12-29 527KB
setuptools-2.0.2.tar.gz (md5)  Source  2013-12-29 765KB
下載setuptools-2.0.2.tar.gz (md5)

解壓縮
在cmd中進(jìn)入到setuptools-2.0.2目錄,執(zhí)行 python setup.py install
成功標(biāo)志:
Installed c:\python27\lib\site-packages\setuptools-2.0.2-py2.7.egg
Processing dependencies for setuptools==2.0.2
Finished processing dependencies for setuptools==2.0.2

繼續(xù)安裝pip

 

*************************************************
pip
在cmd中進(jìn)入到pip-1.4.1目錄,執(zhí)行 python setup.py install
成功標(biāo)記:
Installed c:\python27\lib\site-packages\pip-1.4.1-py2.7.egg
Processing dependencies for pip==1.4.1
Finished processing dependencies for pip==1.4.1

添加到系統(tǒng)環(huán)境變量Path:C:\Python27\Scripts;

在cmd測試,輸入pip,輸出:
C:\Users\***>pip

Usage:
  pip [options]

Commands:
  install                     Install packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  zip                         Zip individual packages.
  unzip                       Unzip individual packages.
  bundle                      Create pybundles.
  help                        Show help for commands.

 

*************************************************
BeautifulSoup
可以利用pip進(jìn)行安裝:
在cmd中敲入命令查找BeautifulSoup:
C:\Users\***>pip search BeautifulSoup
BeautifulSoup             - HTML/XML parser for quick-turnaround applications
                            like screen-scraping.
pynliner                  - Python CSS-to-inline-styles conversion tool for
                            HTML using BeautifulSoup and cssutils
Detextile                 - Convert HTML to Textile syntax using
                            BeautifulSoup.
TreeSoup                  - BeautifulSoup-like wrapper around ElementTree.
beautifulscraper          - Python web-scraping library that wraps urllib2 and
                            BeautifulSoup.
ElementSoup               - ElementTree wrapper for BeautifulSoup HTML parser
beautifulsoup4            - Screen-scraping library
collective.soupstrainer   - Clean up HTML using BeautifulSoup and filter
                            rules.
在cmd中敲入命令安裝BeautifulSoup
C:\Users\***>pip install BeautifulSoup
Downloading/unpacking BeautifulSoup
  Downloading BeautifulSoup-3.2.1.tar.gz
  Running setup.py egg_info for package BeautifulSoup

Installing collected packages: BeautifulSoup
  Running setup.py install for BeautifulSoup

Successfully installed BeautifulSoup
Cleaning up...
還可參見:安裝Beautiful Soup
http://blog.sina.com.cn/s/blog_8af1069601019vr2.html
 

*************************************************
PyYAML 
可以利用pip進(jìn)行安裝
C:\Users\***>pip search pyyaml
PyYAML                    - YAML parser and emitter for Python
pyaml                     - PyYAML-based module to produce pretty and readable
                            YAML-serialized data
yamly                     - pyyaml wrapper
enhancedyaml              - It makes it more convenient to use PyYAML.

C:\Users\***>pip install PyYAML
Downloading/unpacking PyYAML
  Downloading PyYAML-3.10.tar.gz (241kB): 241kB downloaded
  Running setup.py egg_info for package PyYAML

Installing collected packages: PyYAML
  Running setup.py install for PyYAML
    checking if libyaml is compilable
    Unable to find vcvarsall.bat
    skipping build_ext

Successfully installed PyYAML
Cleaning up...

 

*************************************************
nltk
https://pypi./pypi/nltk/
nltk 2.0.4
File Type Py Version Uploaded on Size
nltk-2.0.4.tar.gz (md5)  Source  2012-11-07 933KB
nltk-2.0.4.win32.exe (md5)  MS Windows installer  2.5 2012-11-07 1MB
nltk-2.0.4.zip (md5)  Source  2012-11-07 1MB
下載nltk-2.0.4.tar.gz

解壓縮,在cmd中進(jìn)入到nltk-2.0.4目錄,執(zhí)行 python setup.py install
成功標(biāo)志:
Installed c:\python27\lib\site-packages\nltk-2.0.4-py2.7.egg
Processing dependencies for nltk==2.0.4
Searching for PyYAML==3.10
Best match: PyYAML 3.10
Adding PyYAML 3.10 to easy-install.pth file
Using c:\python27\lib\site-packages
Finished processing dependencies for nltk==2.0.4

打開python Idle:
輸入import nltk
輸入nltk.download()
出現(xiàn)一個(gè)NLTK Downloader對話框,修改Download Diretory(E盤或其他盤符下)。點(diǎn)擊all開始下載。

下載慢還可以到NLTK Corpora http:///nltk_data/手工下載缺失的,然后放到Download Diretory,zip別刪。
重裝系統(tǒng)后nltk_data文件夾可以保留,避免重復(fù)下載。

 

*************************************************
mysqldb
http://www.lfd./~gohlke/pythonlibs/#mysql-python
MySQL-python-1.2.4.win-amd64-py2.7.exe
直接雙擊安裝。

成功驗(yàn)證:
py文件:
import MySQLdb
connection = MySQLdb.connect(host="127.0.0.1",user="root",passwd="root",db="dbtest")
cursor = connection.cursor()
cursor.execute( "SELECT id,content FROM tabletest  ")
print "Rows selected:", cursor.rowcount

運(yùn)行結(jié)果輸出dbtest數(shù)據(jù)庫中tabletest表的行數(shù)。

    本站是提供個(gè)人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多

    丝袜诱惑一区二区三区| 国产精品美女午夜视频| 东京不热免费观看日本| 老司机精品视频免费入口 | 国产黑人一区二区三区| 99久久精品国产麻豆| 中国美女偷拍福利视频| 蜜臀人妻一区二区三区| 久久精品蜜桃一区二区av| 国产精品一区二区三区欧美| 狠狠干狠狠操亚洲综合| 粉嫩内射av一区二区| 久久热在线视频免费观看| 日韩国产精品激情一区| 日本少妇三级三级三级| 日本女人亚洲国产性高潮视频| 欧美做爰猛烈叫床大尺度| 狠狠干狠狠操在线播放| 亚洲国产香蕉视频在线观看| 成人午夜爽爽爽免费视频| 97人妻精品一区二区三区免| 国产精品一区二区视频成人| 91久久精品中文内射| 欧美午夜一级艳片免费看| 99精品人妻少妇一区二区人人妻| 国产丝袜美女诱惑一区二区| 欧美欧美日韩综合一区| 精品少妇一区二区视频| 五月婷婷六月丁香在线观看| 热久久这里只有精品视频| 日本人妻中出在线观看| 精品人妻一区二区三区四在线| 欧美精品亚洲精品一区| 91福利免费一区二区三区| 国产一级不卡视频在线观看| 国产亚洲不卡一区二区| 富婆又大又白又丰满又紧又硬| 熟女免费视频一区二区| 免费国产成人性生活生活片| 国产一区二区三区免费福利| 国产又粗又硬又大又爽的视频|