Python Development Environment Building (WIN7)

Source: Internet
Author: User
Tags change settings

First, install the configuration python

In fact, in the development of Python is best in the Ubuntu environment, simple and easy to expand the various package. This time, how to build a python development environment on Win7. Because of the cross-platform nature of Python. There's basically no difference between windows and Ubuntu. Below is a few steps to build the development environment.

1. Download (https://www.python.org/downloads/) Install python.2.7.8. Python has a version of 2.7 and 3.x, and it is recommended to use the python-2.7.x version, as Python's large framework supports version 2.7, but does not support the 3.x version. For example, the powerful webpy does not support the 3.x version, as if Web2py,django's support for the 3.x version is not very good.

The installation will follow the default installation mode, which is mainly the setting of environment variables after the installation is complete. Python also configures environment variables, but is much simpler than Java, windows7 under: Computer name, domain, and workgroup settings (change settings), Computers---Properties, environment variables, add c:/python27 to the variable path, That is, the previous installation path.

2. In the command line, enter Python, which appears to indicate that the installation configuration was successful.


Second, installation configuration Pycharm IDE Development tools

During the development of Python, there was no easy development tool like eclipse at first, most of the users estimated to have used Ecplise's Pydev plugin. In fact, the early learning of the python process, and indeed used this tool. But finally, after discovering this pycharm, decisively give up eclipse, because it is too good to use. Pycharm is one of the more handy python editors I've used. And you can cross-platform, both MacOS and Windows can be used, this is better.

Pycharm's official: http://www.jetbrains.com/pycharm/

We can download the free Community Edition, which is enough for us to use. The installation follows the default installation, and the installation starts successfully: Represents a successful installation.

First, preview the interface of Pycharm in the actual application:


Activation mode of Pycharm:

1, the recommended purchase of genuine.

2, you can choose trial, free trial for 30 days.

3, find the Activation code online:

User name: yueting3527

Registration code:

===== LICENSE BEGIN =====

93347-12042010

00001FMHemWIs "6wozmznat3igxkxj

2!nv2i6kso48hggla9jngjq5okz1us

ffr8k "ngzjhzjqt6ibg!1fbqzn9! Vi

===== LICENSE END =====

Third, the use of Pycharm

1, click Create New Project.

2, enter the project name, path, and select the Python interpreter. If the Python interpreter does not appear, go to step 3.


3. Select the python interpreter. As you can see, once the Python interpreter is added, Pycharm will scan the Python expansion pack that you have installed, and the latest version of those expansion packs.

4, after clicking OK, an empty project will be created, containing a. Idea folder for Pycharm management projects.

5. Create a new file: Right-click the newly built Helloword project and choose New---Python file


6, enter the file name: Enter the file name, nothing to say


7, enter the writing interface: Pycharm's default editing interface is very strange, will automatically generate a line __author__ = "Author" of the head. And more commonly used file headers, such as: #coding =utf-8, and so on, instead of automatically generated.


Enter Code:print "Hello word!"


8, set the console : Before running, we find that the "Run" and "Debug" on the shortcut menu are grayed out and cannot be triggered. Because we need to configure the console first. Click the black inverted triangle next to run and go to the "Run/debug configurations" configuration screen. (or click Run---Edit configurations also)


In the "Run/debug configurations" Configuration screen, click the green plus sign, create a new configuration item, and select python. (Because Hello Word is a python program)


On the right side of the configuration screen: name in the column, say hello. Click the SCRIP option to find the hello_word.py we wrote just now


Click OK to automatically return to the editing interface, when the "Run" "Debug" button all turn green!


9, run: Click the green Run button to view the results of the output:


In this case, the Python development environment was built and the first Python project was successfully run.



Python Development Environment Building (WIN7)

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.