A must-see for newbies! Set up a Python development environment

Development environment

Python is a cross-platform programming language, which means that it can run on all mainstream operating systems. Developers can develop and learn Python in Windows, Linux, and Mac, and can even run Python code on Android phones.

All modern computers with Pythonr installed can run any Python program, but there are some differences in how to install Python on different operating systems. In this article, the Windows operating system will be used to build a Python development environment. The installation and verification steps are as follows:

  1. Download and install Python
  2. Verify installation
  3. Install VSCode
  4. Write hello world program

Install Python

Download Python installer

Download the Python installer from the official website, open the Python official website (www.python.org/), click the Downloads menu on the official website, enter the download page and download the Python installer according to your system and required Python version:

This article uses the latest Python 3.11.5 version. Click Download Python 3.11.5 to download it.

image-20230827160149588

Install Python
  1. Double-click the installer: python-xx-xx.exe

image-20230827163101450

  1. When installing, check Add python.exe to PATH and click Install Now to wait for the installation to complete.

image-20230827163224583

After the installation is completed, the installer will prompt that the installation is successful. Click Close to:

image-20230827163519940

Verify installation

  1. Use the shortcut key Win + R to develop the run window:

image-20230827161530188

  1. Enter cmd in the run window to develop the command line window:

image-20230827161613763

  1. After opening the command line window, enter python and press the Enter key. If the Python prompt (>>>) appears, it means that the Windows installation is successful:
vbnet
Copy code
C:\Users\yjwfn>python
Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Install VSCode

To install VS Code, first visit the official website of Visual Studio Code: code.visualstudio.com/, click the button Download for Windows to download the installation program, and after the download is complete, double-click to run the VS Code installer to install VS Code.

  1. Download the VS Code installer

image-20230827164215163

  1. Install VS Code

image-20230827164106408

After the installation is complete, open VS Code.

Install Python plug-in for VS Code

After installing Python and VS Code, we began to write a Hello World program to enter the Python programming world. Before starting to use VS Code to write Python programs, you must first install the Python plug-in for VS Code:

  1. Click the Manage icon in the lower right corner of the VS Code application window and click the Extensions option:

image-20230827164630542

  1. Then search for Python plugin

image-20230827164728411

  1. After clicking the searched Python plug-in, enter the plug-in details and click Install to install the Python plug-in

image-20230827164817099

Run the program hello_world.py

Start VS Code, select the menu File > New File or press Ctrl + N to create a new file, then save the file and name it hello_world.py . After saving the file, enter the following code in it:

bash
Copy code
print("Hello Python world!")

To run this program, select the menu Run > Run Without Debugging:

image-20230827165527890

At the bottom of the VS Code application window a terminal window will appear containing the program’s output:

image-20230827165614907

Summary

This article uses the Windows operating system + VS Code to build a development environment. The installation and setup of the Python environment are very simple. Friends who want to learn Python should start quickly.

Digression

In this era of rapidly growing technology, programming is like a ticket to a world of infinite possibilities for many people. Among the star lineup of programming languages, Python is like the dominant superstar. With its concise and easy-to-understand syntax and powerful functions, Python stands out and becomes one of the hottest programming languages in the world.


The rapid rise of Python is extremely beneficial to the entire industry, but “There are many popular people and not many people“, which has led to a lot of criticism, but it still cannot stop its popularity. development momentum.

Will Python remain relevant and intact for the rest of the next decade? Today, we’ll analyze the facts and dispel some misconceptions.

CSDN gift package: the most complete set of “Python learning materials” on the entire network for free sharing

Friends, if you need it, you can scan the QR code below to get it for free

If you are interested in Python and want to get a higher salary by learning Python, then the following set of Python learning materials will definitely be useful to you!

Materials include: Python installation package + activation code, Python web development, Python crawler, Python data analysis, artificial intelligence, machine learning and other learning tutorials. Even a novice with zero basics can understand and understand it. Follow the tutorial and help you learn Python systematically from scratch!

?
?
This complete version of the complete set of Python learning materials has been packaged. Friends who need it can click on the link below to get it for free.

Readers’ benefit “Python complete set of learning materials”, click here to get it for free! ! !

?

1. Python learning routes in all directions

The Python all-direction route is to organize the commonly used technical points of Python to form a summary of knowledge points in various fields. Its usefulness is that you can find corresponding learning resources according to the above knowledge points to ensure that you learn more comprehensively.

2. Python learning software

If a worker wants to do his job well, he must first sharpen his tools. The commonly used development software for learning Python is here!

3. Python introductory learning video

There are also many learning videos suitable for beginners. With these videos, you can easily get started with Python~

4. Python exercises

After each video lesson, there are corresponding exercises to test your learning results haha!

5. Python practical cases

Optical theory is useless. You must learn to type code along with it and practice it in order to apply what you have learned into practice. At this time, you can learn from some practical cases. This information is also included~

6. Python interview materials

After we learn Python, we can go out and find a job if we have the skills! The following interview questions are all from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and Alibaba bosses have given authoritative answers. I believe everyone can find a satisfactory job after reviewing this set of interview materials.


7. Data collection

The above complete version of Python learning materials has been uploaded to CSDN official. Friends who need it can scan the CSDN official certification QR code below on WeChat to get it for free

?

This complete version of the complete set of Python learning materials has been packaged. Friends who need it can click on the link below to get it for free.

Readers’ benefit “Python complete set of learning materials”, click here to get it for free! ! !