I just saw someone else's post saying that Win11 can't install Python? Coincidentally, I have read to the end of Chapter 2, but the environment has not been built yet. Well, let's build the environment and see if Win11 can't install Python?
First, go to the Python official website and download the corresponding software for the corresponding operating system. I use Windows 11, so I download the Windows installer (64-bit)
After downloading OK, you can happily install it. First, double-click the installation software. After double-clicking, the following picture will appear. The following picture is to choose how to install, such as direct installation or custom installation, whether to choose administrator privileges to install, and there is also an option to add the python path. OK, I chose custom installation because I want to change the installation path. As shown in the following picture.
After selecting custom installation, the interface below will appear. Everything is checked by default, so I will just follow the default.
After selecting, click Next, enter the setting path and advanced options, click OK according to my selection. Then click Install.
The picture below is the installation interface.
Wait a moment and it will be installed. After installation, you need to test whether the environment is OK. We only need to press win+R to enter the cmd interface, enter python, and press Enter. If the python version number and other information appear, it means that the environment is OK.
The next step is to install the Mu editor. As the name suggests, Mu is a Python editor that provides a simple interface and easy-to-use functions, making it ideal for writing Python code. The Mu editor also integrates MicroPython, which allows you to run code directly on microcontrollers, making it ideal for learning and practicing IoT and embedded development. Download address:
https://codewith.mu/en/download
It is the same as normal. Select the operating system that suits you, then download and wait. After the download is successful, it will be an msi file, which is also a format of Windows installation file. Double-click it. As shown in the figure below.
There is no option to select a path, just choose to install it.
The above is the operation of installing Mu editor. It is super simple, isn't it? The next step is to open Mu editor. After opening it, you will find that there is also a mode selection. You can choose microPython, which I also like to play with. This is a kind of input embedded development, which is to run micropython on the microcontroller/SOC. Of course, today's protagonist is not it. We choose python 3 to edit, compile, debug and run python.
After making your selection, you will enter the code editing interface. We can copy the code from the previous chapter here and play with it. After copying, you need to save it before running it. Save the .py file. After saving, you can run and debug it.
Look, the above picture shows that this code can be run completely and debugged normally. In fact, looking back, installing the Python environment is quite simple~