Configuring the python2.7+tornado3.3 development environment under WINDOW7

Source: Internet
Author: User

Most people who play Python develop under Linux, and because of their long-term habit of developing code under Windows, today's egg aches try to configure python2.7+ under WINDOW7 tornado3.3 development environment, inevitably encountered a variety of errors in the middle, but the final configuration is successful, posting convenience users less detours.

Start!

Premise: python2.7 installation is relatively simple, and there are a large number of articles on the internet can be found, here is no longer described, directly into the tornado3.3 installation.

My python2.7 is in D:\Python27.

1.tornado Downloads

Download Tornado project directly from GitHub using Git tools

For Python more than 2.6 version, because the standard library has included in the Epoll support, so you can not setup.py compile installation, online people say that the Tornado directory directly added to the PYTHONPATH can be used. But I still use the Tornad O source is installed directly into the Python installation to enter the country.

Run->cmd and then go to the tornado path to execute:

1 Python setup. Py Install

, I encountered a compile error, vcvarsall.bat this did not find, the reason is that python in the registry to find the VS directory, and then to the VS directory to find Vcvarsall.bat. But the problem of my machine vs version is relatively low, Python is the default is vc9.0 is vs2008 so it can not find the key value in the registry, return none, you may install a vs2008 above version, this problem is ignored, because it will not affect the use of later ( We do not need to compile the installation)

Install after execution will be in the Pyhon installation path \lib\site-packages A tornado folder, Tornado initial installation but not yet completed

Tornado has been tested in Python 2.5, 2.6, and 2.7. To use all features of Tornado, you need to install Pycurl (7.18.2 or later)

2. Installing Pycurl

To http://pycurl.sourceforge.net/download/address download Pycurl-7.19.0.2.win32-py2.7.exe Direct default installation is OK

After installation, there will be more things under the \lib\site-packages.

Through the online article research to this come, think is finished, so began to run the classic "helloworld.py" Found error .... My heart pulls cold and I pull it cold

Obviously lacks backports.ssl_match_hostname dependency, okay, go online and find this dependency.

3. Download Backports.ssl_match_hostname

To https://pypi.python.org/pypi/backports.ssl_match_hostname download Backports.ssl_match_hostname 3.4.0.2, unable to find Win32 Direct installation version , you can download the source code, install it Yourself

Execute under the backports.ssl_match_hostname-3.4.0.2 path

1 Python steup install

It's tragic, still less dependent on setuptools.

4. Continue to find dependent setuptools

Online find a bit, in Baidu cloud disk download a Win32 version Setuptools-0.6c11. Win32-py2.7.exe

Address is: HTTP://PAN.BAIDU.COM/S/15R6W4

Install once again after installing OK

Finally run the helloworld.py again, the success of the!!!!!!

Configuring the python2.7+tornado3.3 development environment under WINDOW7

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.