Python and PyCharm installation tutorial (novice tutorial)

 

Table of contents

I. Introduction

Two, Python installation

1. Python official website download

2. Run Python

3. Development tool PyCharm installation

1. Download from PyCharm official website

2. Activation code sharing


I. Introduction

Currently, there are two versions of Python, one is version 2.x and the other is version 3.x, these two versions are not compatible. Due to the increasing popularity of 3.x versions, our tutorials will be based on the latest Python 3.9.7 version.

Two, Python installation

1. Python official website download

Python official website http://www.python.org/download/

There are many versions, the version we choose is 3.9.7 (the latest version may not be good) 

After the download is complete, click Run, and the installation interface will appear, remember to tick

Let's install it manually

2. Run Python

After the installation is successful, open the command prompt window (win+R, enter cmd and press Enter), and after typing python, two situations will appear.

Case 1:

This appears to indicate that the python installation was successful. When you see the prompt  >>>  , it means that we are already in the Python interactive environment, you can enter any Python code, and you will get the execution result immediately after pressing Enter. Now, enter exit() and press Enter to exit the Python interactive environment (or close the command line window directly). 

Case two:

I can't demonstrate here, because I installed it successfully, I will give a pseudo-demonstration, and use the wrong pythonn instead of python, so that an error message will be prompted.

  This is because Windows will search for python.exe according to the path set by a Path environment variable. If it is not found, an error will be reported. If you omit to check Add Python 3.9.7 to PATH during installation, you must manually add the path where python.exe is located to Path.
     If you find that you forgot to check or will not set the PATH path, then you reinstall it and remember to check Add Python 3.9 to PATH and it will be ok.

3. Development tool PyCharm installation

Install the PyCharm tool, which can be downloaded from the Internet. There are many resources, and there are also installation-free versions, which can be used after decompression. What I am demonstrating now is the Pycharm development tool that needs to be installed.

PyCharm official website https://www.jetbrains.com/pycharm/download/?section=windows

Double-click the downloaded installation package

 

 

 My sharing is over here, welcome to the comment area to discuss and communicate! !

If you find it useful, please give it a thumbs up ♥ ♥

Guess you like

Origin blog.csdn.net/weixin_74318097/article/details/132180975