Python development on Window -- 1. Build a Development Environment

Source: Internet
Author: User

In fact, it is best to develop python in the ubuntu environment, which is simple and easy to expand various packages. However, my linux computer is not around for the time being. My wife's computer Windows 7 cannot be recovered.

Python is cross-platform. There is basically no difference between windows and ubuntu. Below are a few steps to build a development environment.

 

Download and install python.2.6.Python has version 2.6 and version 3.x, and it is recommended to use the python-2.6.x version because python's major frameworks support version 2.6, but not version 3.x.

 

For example, the introduction and powerful webpy does not support version 3.x. It seems that web2py does not support version 3.x very well.

 

After installation, follow the default installation mode, mainly to set environment variables after installation.

 

After the installation is complete, Enter cmd in the menu> search box and enter python in the Command column. The following prompt is displayed. The installation is successful.

 

2. Install the pycharm IDE development tool.

During the python development process, no convenient development tools like eclipse have been found at the beginning. Most users may have used the pydev plug-in of ecplise. In fact, this is also used in the python process of early learning.

Tool. But after finding this pycharm, I decided to give up eclipse, because it is too easy to use.

Official pycharm:

Http://www.jetbrains.com/pycharm/

We can download the free Community version, which is enough for us to use. Install the SDK by default. The installation is successful and starts as follows.

 

3. Use pycharm to develop python.

Create a python project and run the following code:

 

__author__ = 'xcy'def hello():    print(hello ,this is first app )def test(value1=1,value2=2):    return value1+value2if __name__ == '__main__' :    hello()    var=test(2,4)    print('var=%d ' % var)
Running result:

 

 

This tool not only prompts code automatically, but can be used for debugging and development. There are many other functions that interest you.

 

 

 

 

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.