Clearly install the Python interpreter (multi-version coexistence switching), Python IDE: PyCharm (professional version permanent), thorough!

Python interpreter installation

————————

Interpreter (English: Interpreter). Users can directly download the Python interpreter installation program from Python's official website.
Enter in the browser address bar:

http://www.python.org

If you need permanent access to the latest professional version of PyCharm, scan the QR code to get it for free. There are only a few spots left.

Then log in to Python’s official website and click on the picture below:

This time I chose to download the Windows 64-bit installation package of Python 3.10.10 version

The download is complete, the installation file is only 27.6MB:

Run Python's installer python-3.10.10-amd64.exe as administrator.

Picture belowIdentification 1Check Add Python.exe to PATH, it will help us add Add the path to the Python interpreter to the environment variable _(Note 1)_ so that you can run the Python interpreter directly from the command line or terminal window.

The picture belowIdentification 2 Check Use admin privileges when installing py.exe, indicating that during installation Use administrator privileges when using Python. If you select this option, the installer will request elevation to administrator privileges to make it easier to install Python and configure it properly on your system. I can’t check it here, maybe because other versions have been installed.

Click the image belowIdentification 3_Customize installation_Customized installation, which allows users to choose the installation path and which Python to install according to their own needs Components and Tools.

Note 1:

When we successfully installed Python 3.10.10, because this installation did not choose to install for all users, the environment variables looked at the current user's.

Figure 1

As you can see, there are two python interpreters in the _system environment variables_: Python311 and Python37. Since Python37 is located higher in the environment variables than Python311, the system will give priority to the python version Python37.

Do the following operations in CMD, and the feedback is Python 3.7.9.

Through the operation in the figure below, we manually move Python311 up

** Do the following operations in CMD. The feedback is Python 3.11. **

How can I specify Python3.10? Delete the current user's environment variable in Figure 1 and add it to the system environment variable

** Do the following operations in CMD. The feedback is Python 3.10. **

Next, the installation wizard will prompt you to check the required "Optional Features", here we can directly select them all.

The figure below identifies 1 Documentation (Instructions), which is an offline .chm format document and must be retained. Friends who are not OK proficient in English can read this document directly, which is more reliable than any other book. If you are stressed about reading English, it is good to check the usage of standard library modules at any time.

The figure below identifies 2 pip Python package download tools, which must be retained.

The figure below identifies 3 tcl/tk and IDLE, install the tkinter package and IDLE development environment_(Note 2)_.

The figure below identifies 4 Python test suites. You don’t need to have this. Of course, it doesn’t matter if you keep it.

The following figure identifies 5 py launcher. If installed for all users, administrator permissions_(Note 3)_ are required. I can't check it here. "py launcher" was already installed when installing 3.11.

Note 2:

tkinterThe package ("Tk interface") is the standard Python interface to the Tcl/Tk GUI toolkit. Tcl/Tk has been integrated into Python for some years. Python programmers can use this robust platform through the tkinter package and its extensions tkinter.tix module and tkinter.ttk module Independent window toolset.

The tkinter package is a thin object-oriented wrapper around Tcl/Tk. With tkinter, you don't need to write Tcl code, but you will need to consult the Tk documentation. tkinter is a set of wrappers that implement Tk's visual components as corresponding Python classes. IDLE: Python's integrated development and learning environment, itself is entirely written in Python and the Tkinter GUI toolkit.

Note 3:

py launcher is suitable for Windows users and is suitable for users who have multiple Python versions on their computers. Nowadays, the Windows installer of the latest Python version must come with the py launcher installer. The Python launcher for Windows (py launcher) is a utility that helps find and execute different Python versions. py launcher allows you to set the Python version to use through a script (or command line: cmd, power shell). Unlike environment variables (PATH variables), by default py launcher will choose the most appropriate Python version for you.

Next is the selection of Advanced Options.

  • Install for all user, whether to install it for everyone, if so, the permission of administrator is required. It is recommended to check this box.

  • identifies 1 associated file to Python, just leave this as is. It associates the .py file with the python program, so that when you double-click the .py file, the < a i=4> to execute. It is recommended to check this box. python

  • Mark 2 to create a shortcut and just leave it as is. It is recommended to check this box.

  • Mark 3 adds Python to the environment variable, and the 2nd occurrence adds the path to "Python" to the environment variable. It is recommended to check this box.

  • Mark 4 "Customize install location" (custom installation path) is strongly recommended to be modified to a custom path. This path should not contain Chinese, spaces or other special characters. Paying attention to this will save you a lot of unnecessary trouble. After the settings are completed, click "Install" to start the installation.

If the installation is successful, the screen shown below will appear.

The keyword "successful" identifies the successful installation of 1. If the installation fails, the word here will become "failed".

Mark 2 prohibits path depth restrictions. It is strongly recommended to click this option. Otherwise, when installing third-party libraries or third-party tools in the future, the installation may not be possible due to Windows' restrictions on path depth.

If you need permanent access to the latest professional version of PyCharm, scan the QR code to get it for free. There are only a few spots left.

Guess you like

Origin blog.csdn.net/maiya_yaya/article/details/134987913