Win7 Python Environment Preparation configuration

Source: Internet
Author: User
Tags windows x64 windows x86 xml parser yaml parser nltk

Includes download installation configuration for PYTHON,ECLIPSE,JDK,PYDEV,PIP,SETUPTOOLS,BEAUTIFULSOUP,PYYAML,NLTK,MYSQLDB.

*************************************************
Python
Download:
Python-2.7.6.amd64.msi
http://www.python.org/
Python 2.7.6 Released
Python 2.7.6 is now available.
http://www.python.org/download/releases/2.7.6/
Windows x86-64 MSI Installer (2.7.6) [1] (SIG)

Installation

Configuration:
The path of the system variable-----environment variable----property----------add:C:\Python27;

Verify:
Create a file pt.py on the desktop, with the contents of print ' Hello python '
Enter command in cmd python c:\users\***\desktop\pt.py
is the computer user name.


C:\users\***>python c:\users\***\desktop\pt.py
Hello python

C:\users\***>

*************************************************
Eclipse:
Eclipse-java-indigo-sr2-win32-x86_64.zip
http://www.eclipse.org/downloads/
Older Versions
Http://wiki.eclipse.org/Older_Versions_Of_Eclipse
Eclipse Indigo SR2 Packages (v 3.7.2)
Http://www.eclipse.org/downloads/packages/release/indigo/sr2
Eclipse IDE for Java Developers, (MB)
Downloaded 1,226,421 timesdetails Windows 32-bit 64-bit
http://www.eclipse.org/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
For the development of Python engineering in Eclipse.
http://sourceforge.net/projects/pydev/files/
PyDev for Eclipse
Looking for the latest version? Download PyDev 3.2.0.zip (8.2 MB)
Version has been in the update, a few days ago is 3.1.0.zip

After downloading, unzip and copy the contents of the features and plugins folders to the features and plugins folders of Eclipse respectively.
Duplicates are replaced.

Specific methods See Windows xp,32 bit, environment, Eclipse+python Platform Building
Http://blog.sina.com.cn/s/blog_8af1069601019uaw.html
"Install Python plugin", open Eclipse first to configure preference-"pydev-" interpreter-python-"New python executable exe file directory

*************************************************
Pip
Https://pypi.python.org/pypi/pip
Download
Pip-1.4.1.tar.gz
A tool for installing and managing Python packages.
Unzip, enter into the pip-1.4.1 directory in cmd, execute python setup.py install
Error:
Importerror:no module named Setuptools
So, you need to install Setuptools first

*************************************************
Setuptools
https://pypi.python.org/pypi/setuptools/
Setuptools 2.0.2
Click the Downloads button on the right to jump to downloads
Scroll to the very bottom of the page to find the links.
Need to go to the bottom of the page to find links to download.

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
Download setuptools-2.0.2.tar.gz (MD5)

Unzip
Enter into the setuptools-2.0.2 directory in cmd, execute python setup.py install
Success Flag:
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

Continue to install PIP

*************************************************
Pip
Enter into the pip-1.4.1 directory in cmd, execute python setup.py install
Success Tokens:
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

Add to System environment variable path:C:\Python27\Scripts;

In the CMD test, enter Pip, output:
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
You can use Pip to install:
In cmd, typing a command to find 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.
Typing commands in cmd install 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 ...
Also see: installing Beautiful Soup
Http://blog.sina.com.cn/s/blog_8af1069601019vr2.html

*************************************************
Pyyaml
Can be installed with PIP
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.python.org/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
Download nltk-2.0.4.tar.gz

Unzip, enter into the nltk-2.0.4 directory in cmd, execute python setup.py install
Success Flag:
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

Open python Idle:
Enter import NLTK
Input nltk.download ()
A NLTK Downloader dialog box appears, modifying the download diretory (e-drive or other drive letter). Click on all to start the download.

Download slow can also go to NLTK corpora http://nltk.org/nltk_data/manual download Missing, and then put to download diretory,zip do not delete.
The Nltk_data folder can be retained after reloading the system to avoid repeated downloads.

*************************************************
MySQLdb
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
Mysql-python-1.2.4.win-amd64-py2.7.exe
Double-click the installation directly.

Successful validation:
PY file:
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

Win7 Python Environment Preparation configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.