Home > Article > Backend Development > Set up Python compilation environment in Windows environment
The content of this article is to build a Python compilation environment in the Windows environment. It has certain reference value. Now I share it with you. Friends in need can refer to it
Windows Not all systems have Python installed by default, so you may need to download and install it, and then download and install a
text editor (using the previous PyCham: click to open the link).
1. Install Python
First, check whether Python is installed on your system. To do this, type command in the Start menu and press Enter to open a command window; you can also hold down the Shift key and right-click on the desktop and select "Open command window here." Enter python in the terminal window
and press Enter; if the Python prompt (>>>) appears, it means that Python is installed on your system. 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, visit http://python.org/downloads/.
You will see two buttons for downloading Python 3 and Python 2. Click the button to download Python 3, which will automatically download the correct installer for your system. After downloading the installer, run it. Be sure to select the checkbox Add Python to
PATH (shown in Figure 1-2), which makes it easier to configure your system.
2. Start a Python terminal session
command window and execute the command python in it. If the Python prompt (>>>) appears, it means that Windows has found the Python version you just installed.
C:\> python Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 22:15:05) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
C:\> python 'python' is not recognized as an internal or external command, operable program or batch file.
, so the path of the file python is C:\Python35\python. If you can't find this file, enter python in the Windows Resource Manager's search box. This will allow you to know exactly where the command python is stored on your system.
If you think you know the path to the command python, enter the path in the terminal window to test. To do this, open a
command window and enter the full path you determined:
C:\> C:\Python35\python Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 22:15:05) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
Execute the following command in the Python session and confirm that you see the output "Hello Python world!".
>>> print("Hello Python world!") Hello Python world! >>>
Related recommendations:
Building a Python programming environment in Windows systems
Building Python environment under windows system
Building python nltk development environment under windows environment
The above is the detailed content of Set up Python compilation environment in Windows environment. For more information, please follow other related articles on the PHP Chinese website!