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:
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:

  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:

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.

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.

If you are interested in Python and want to learn Python, here I would like to share with you a Complete set of Python learning materials, which I compiled during my own study. I hope it can help you, let’s work together!

Friends in need can click the link below to get it for free or Scan the QR code below to get it for free
Click here

1Getting started with zero basics

① Learning route

For students who have never been exposed to Python, we have prepared a detailed Learning and Growth Roadmap for you. It can be said to be the most scientific and systematic learning route. You can follow the above knowledge points to find corresponding learning resources to ensure that you learn more comprehensively.

② Route corresponding learning video

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

③Exercise questions

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

2Domestic and foreign Python books and documents

① Documents and books

3Python toolkit + project source code collection

①Python toolkit

The commonly used development software for learning Python is here! Each one has a detailed installation tutorial to ensure you can install it successfully!

②Python practical case

Optical theory is useless. You must learn to type code along with it and practice it in order to apply what you have learned to practice. At this time, you can learn from some practical cases. 100+ practical case source codes are waiting for you!

③Python mini game source code

If you feel that the practical cases above are a bit boring, you can try writing your own mini-game in Python to add a little fun to your learning process!

4Python interview questions

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.

5Python part-time channel

Moreover, after learning Python, you can also take orders and make money on major part-time platforms. I have compiled various part-time channels + part-time precautions + how to communicate with customers into documents.

All the above information , if friends need it, you can scan the QR code below to get it for free