当前位置:网站首页>PyCharm usage tutorial (detailed version - graphic and text combination)

PyCharm usage tutorial (detailed version - graphic and text combination)

2022-08-02 08:38:00 m0_67402125

Table of Contents

One, create a project

Second, run

Three, error message

four, install the tripartite package


The use of PyCharm runs through the whole Python learning, so it is not suitable to take out a tutorial alone. It is still unclear to the novice if you say too much. Here we will start with some functions of PyCharm that you need to use before learning., in the following python video tutorial, we will tell you more about itAdvanced usage.

We have already installed PyCharm in the last lesson, so I won't talk about it here, let's start with creating a project.


1. Create a project

1. Every time we develop a new project, we need to create an environment. Open PyCharm here and click Create New Project directly.

2. Select the project path

3. Click Create to start creating, so that we not only create a new project directory, but also configure the development environment.Then enter the working interface of the IDE, click file, and then click new to create a subdirectory or file.

4. If you create a file, click the Python file pointed by the arrow in the figure below. If you are creating a subdirectory, you can choose 1 or 2 in the figure below. The difference between the two is that 1 is a normal directory and 2 is a package.The directory can be imported directly. I won't talk about it here. It will be explained in detail in the virtual environment later.


Second, run

We have created the above projects and files. For the convenience of demonstration, I have written a piece of code in the new asking price test.py.

import randomi = [1, 2, 3] for i in range(1, 10):print(i)

Let's run this code, here we find three green triangle symbols, we can all click, but there is a little difference between these three symbols, it is not convenient to demonstrate here, we will demonstrate the difference one by one in the python basic video tutorial,Here you just need to know that it is best to select the green triangle symbol below the right button to run the code.


Three, error message

If there is an error in our code, there will be a prompt in the run below PyCharm, as shown below


Fourth, install the tripartite package

To install the third-party package, you can directly use CMD, select the correct path, and then install the third-party package.

I will explain the CMD commands here one by one in the following video lessons.

In addition, we can also install directly through the IDE, switch to Terminal and select the correct path to install the third-party package.

Also, install directly in the setting. This is the recommended installation method. The installation path will not be wrong, and the environment will not be chaotic.

PyCharm's tutorial I will introduce so much first, and then the video course will followThere will also be many related usages, which cannot be explained here, such as virtual environment installation, file format conversion, template creation, debugging, etc.

Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials

原网站

版权声明
本文为[m0_67402125]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/214/202208020802330625.html