Install Python under Windows

Source: Internet
Author: User

First of all, I am slightly angry to write this blog post, the reason is very simple, when the online information is all ambiguous copy and paste without substantial help cause you repeatedly hit the wall, the blood naturally a little surging.

The landlord actually just contact Python, this afternoon after reading the entry-level "Python primer" The first two chapters, want to download to see, Google finished "under the Windows Python installation", a little dumbfounded, not from the environment variable start, that is similar to the next down on the good. I am thinking of the Foreign Language website Information link to give the details of a little, convenient readers is our csdn bo owners of small purposes.

Okay, don't talk nonsense.

Download the Python installation package to the Python website www.python.org

I do not know how others are installed, I only know that they have entered the site, just as the feeling of entering the chinadaily, is the feeling of Hemp hemp (not a bad foreign language, I new TOFEL97 points, IELTS7 points), the vast expanse of where you can find resources links, I believe this is also a lot of friends agree. My installation method is: Click Windows in the left branch, go to the new page, there is a

Alternative Packages for Windows.and then there's a Activestateactivepython

Click on it is right, and then enter a new interface, the top has a huge gray banner, point download button can be quietly waiting (specific link here: Http://www.activestate.com/activepython), about a forty or fifty M , listen to a song and come back. After the completion of the child is directly a. msi file, double-click, this time really is all the way next down, just fine ~


PS: note here, I install x64 3.3.4 MSI under win8.1 the error cannot open the installation package, then I try to x86 3.3.4msi display success, this is not clear, although I am a 64-bit computer.


Do not be happy too early, after you download and install Python, does not mean that you are ready to use, by default, the system will not add the corresponding environment variables, so at this point you use any Python command line is futile.

you first need to register the Python environment variable in the system: assuming that the installation path for Python is c:\python27, modify the environment variables, properties--- The path in the system variable is:

(in order to run the Python command in command-line mode, you need to append the directory where the Python.exe resides to the environment variable of path.) )

   Path=path;c:\python27 (These two words should be intact, remember)

Once the above environment variable is set up successfully, you can use the Python command directly at the command line. or execute "python*.py" to run the Python script. Then go to the command line, Windows key +r, then cmd, enter into the DOS interface, input python, and enter the Python language editor prompt. Knock a print "Bo Master is handsome", if there is a blogger is handsome , you will be successful, if not, The blogger is still very handsome.

At this point, you can still run the Python script only through "python*.py", and if you want to run *.py directly, simply modify the other environment variable Pathext:

   Pathext=pathext;. PY;. PYM

As for Semir with this activestate installation method, the reader may wish to try a pilot to choose the left of the release, choose a version next, after the matter, you find that the chrysanthemum tight, is not other, because the folder more you are overwhelmed, OK, I admit that I am lazy people, Technology is convenient, isn't it?

Also, in the process of using Python, it may be necessary to review the help documentation for a command frequently, such as using "print" to view the instructions for use of the Print command. The default installation of Python is not able to view the help documentation, and it requires a simple configuration:

Under the Python installation directory, locate Python27.chm, use hh-decompile.python26.chm to decompile it, and then add its directory to the PATH environment variable mentioned above.

and to be able to import the modules of a third party other than the default installation path, such as a module of your own, you need to create a new pythonpath environment variable with the variable value for the directory where the module resides.


Transferred from: http://blog.csdn.net/eland_edwiin/article/details/8483236

Install Python under Windows

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.