Build a Python build environment in a Windows environment

Source: Internet
Author: User
This article introduces the content is in the Windows environment to build a python compilation environment, has a certain reference value, now share to everyone, the need for friends can refer to

Not all Windows systems have Python installed by default, so you may need to download and install it, and then download and install a
Text editor (with previous Pycham: Click to open link).
1. Install Python
First, check if Python is installed on your system. To do this, enter command in the Start menu and press ENTER to hit
Open a command window; You can also hold down the SHIFT key and right-click the desktop and select "Open Command Window Here". In the terminal window
Enter Python and press ENTER, and if a Python prompt (>>>) appears, your system has Python installed. However
You may also see an error message stating that Python is an unrecognized command.
If this is the case, you will need to download the Windows Python installer. To do this, please visit http://python.org/downloads/.
You'll see two buttons to download Python 3 and Python 2, respectively. Click the button for download Python 3, which is based on the
Your system automatically downloads the correct setup program. After you download the installer, run it. Be sure to check the box add Python to

PATH (1-2), which makes it easier to configure your system.


2. Start a Python terminal session
By configuring your system to run Python in a terminal session, you can simplify the configuration of your text editor. Open a
Command window and execute a command python. If a Python prompt (>>>) appears, it means that Windows found
The version of Python you just installed.

C:\>  Pythonpython 3.5.0 (v3.5.0:374f501f4567, Sep, 22:15:05) [MSC v.1900 + bit (Intel)] on Win32type "Help" , "copyright", "credits" or "license" for more information.>>>

If so, you can jump directly to the next section-"Run Python in a terminal session."
However, the output may resemble the following:

c:\>  python ' python ' is not recognized as an internal or external command, operableprogram or batch file.

In this case, you'll have to tell Windows how to find the version of Python you just installed. Command Python usually saves
stored in the C drive, so open the C drive in Windows Explorer, where you find and open the folder that starts with Python,
Find the file Python again. For example, on my computer, there is a folder named Python35, which has a python
file, so the path to the file Python is C:\Python35\python. If you cannot find this file, use the Windows resource
Manager's search box, which will allow you to know exactly where the command python is stored in the system.
If you think you know the path to the command python, enter the path in the terminal window to test it. To do this, open a

Command window and enter the full path you identified:

C:\>  C:\Python35\pythonPython 3.5.0 (v3.5.0:374f501f4567, Sep, 22:15:05) [MSC v.1900 + bit (Intel)] on win3 2Type "Help", "copyright", "credits" or "license" for more information.>>>

If it works, it means you know how to access Python.
3. Running Python in a terminal session
Execute the following command in a Python session and confirm that you see the output "Hello Python world!".

>>>  Print ("Hello Python world!") Hello Python world!>>>

Whenever you want to run a Python code snippet, open a command window and start a Python terminal session. To close the final
, press CTRL + Z, press the ENTER key, or you can execute the command exit ().


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.