Table of Contents
1. Python Integrated Development Environment-Pycharm Introduction
The community version of pycharm only has python projects and pure python. The professional version of pycharm has templates for Django projects, flask frameworks and other project file types.
1. After the configuration is completed, select “Creat new project”
4. Chinese Pycharm
Right-click on the place where the line number is displayed and check Show Line number.
Settings->Plugins->Browse repositories, and then enter the plug-in you want to install.
Right click->copy path.
right click->Show In Explorer in the file manager.
Place the cursor in the middle of the word, and then press ctrl b or press the ctrl key and the left mouse button.
Open Pycharm, click File --> Settings, select Project Interproter in the Project ** option on the left, and click " ” option, that is, the Install installation option. The specific steps are as shown below:
Home Backend Development Python Tutorial What are the tips for using Pycharm, the Python integrated development environment?

What are the tips for using Pycharm, the Python integrated development environment?

May 14, 2023 pm 03:16 PM
python pycharm

1. Python Integrated Development Environment-Pycharm Introduction

PyCharm is a powerful tool for writing complex functional codes that need to be structured. Here is an introduction to how to install PyCharm under Windows.

Operating system: Windows10

PyCharm version: community-2019.2.4

What are the tips for using Pycharm, the Python integrated development environment?

##For the local download address, see the end.

Pycharm and Jupyter, the two best IDEs for Python development.

2. Installation steps:

1. Double-click the executable file pycharm-community-2019.2.4.exe, modify the installation path, and then click "Next"

What are the tips for using Pycharm, the Python integrated development environment?

2. Check the Installation Option as shown in the figure, and then click "Next"

What are the tips for using Pycharm, the Python integrated development environment?##3. Click "Install" and wait for installation

What are the tips for using Pycharm, the Python integrated development environment?4. After the installation is completed, you will be prompted whether to restart the operating system immediately. To ensure functional integrity, select restart immediately.

After restarting, open the software. In addition to selecting the page style, other plug-ins do not need to be selected. Just go to next. A beautiful green interface appears


What are the tips for using Pycharm, the Python integrated development environment?Install the professional version, Simplified Chinese is permanently free to use

The community version of pycharm only has python projects and pure python. The professional version of pycharm has templates for Django projects, flask frameworks and other project file types.

What are the tips for using Pycharm, the Python integrated development environment?1. After downloading, open the compressed package and see the crack patch, installation program, and Chinese components arranged from top to bottom

What are the tips for using Pycharm, the Python integrated development environment?2. Click Install, the installation interface will pop up, click next, and the selection of the installation path will appear. Remember this path, which is required for the localization process.

Then keep clicking next until pycharm is installed, and check the run box on the last page.

Go here and choose to run pycharm. After starting, choose free use and click the blue button to enter the use. Interface

What are the tips for using Pycharm, the Python integrated development environment?#3. Create or open the project according to the prompts and enter the main interface. At this time, drag the crack patch mentioned at the beginning of the article directly into the pycharm usage interface. A prompt will pop up, click Restart

What are the tips for using Pycharm, the Python integrated development environment?

What are the tips for using Pycharm, the Python integrated development environment?4. After restarting, you can see that the patch has taken effect. Follow the default selection. To activate, click the blue Install PyCharm button, and then wait until PyCharm restarts

What are the tips for using Pycharm, the Python integrated development environment?

What are the tips for using Pycharm, the Python integrated development environment?5. After entering the main interface, click Click the help on the toolbar and click the about button in the drop-down bar to view the registration information

What are the tips for using Pycharm, the Python integrated development environment?6. Congratulations, you can use it for free, and the period of use is until 2089. Let’s start your magical journey below, and use python to reach the top of your life

Conclusion: If you need Chineseization, copy the resources_zh_CN_PyCharm_2020_r1.jar Chineseization package to the lib file of the software installation path to Chineseize the software. Just restart.

Note: pychram2021 already comes with its own Chinese version.
Open the menu bar File, select Settings, then select Pulgins, click Marketplace, search for chinese, and then click install to install. Just restart.


3. Create a test program

1. After the configuration is completed, select “Creat new project”

What are the tips for using Pycharm, the Python integrated development environment?2. Select the path where the project is stored (this path must be empty, otherwise it cannot be created) to create a new project virtual environment by default, then click "Create" and wait for the environment to be configured.

Python code requires a running environment to run. It is not recommended to use the system interpreter global interpreter directly in Pycharm. The third-party packages to be used are also managed here.
When creating a Python project, pycharm can choose the virtual environment you need to use. This time we introduce the use of the default Virtualenv.
The virtual running environment can separate projects. Each project can have an independent running environment. Of course, you can let multiple projects share a virtual environment.

Fill in the project path and project name in Location;
The second Location is the path of the virtual environment
Select the global Python interpreter in the Base interpreter drop-down box;
Check Inherit global site-packages: you can use third-party libraries in the base interpreter (that is, use cmd command to install the third-party library globally), if not selected, it will be completely isolated from the outside world;
Check Make available to all projects: This virtual environment can be provided to other projects.
Virtualenv creates a venv folder in the root directory of the project by default to store the contents of the virtual environment.

What are the tips for using Pycharm, the Python integrated development environment?

#3. After the configuration is completed, just "Close" the pop-up prompt box. Of course, it’s okay if you’re interested and want to take a look. Overall structure of the interface

What are the tips for using Pycharm, the Python integrated development environment?

#After entering the main interface, right-click the path created above and click "New" - "Python File"

What are the tips for using Pycharm, the Python integrated development environment?

4. Enter a file name and press Enter. The system will automatically generate and open a tab with the .py suffix

What are the tips for using Pycharm, the Python integrated development environment?

5. Enter at the cursor print('Hello World!'), then right-click the tab and select Run, or use the shortcut key Ctrl shift F10

What are the tips for using Pycharm, the Python integrated development environment?

6. The running results will automatically pop up in the area below the software. If the following results appear, congratulations, you succeeded!

What are the tips for using Pycharm, the Python integrated development environment?

4. Chinese Pycharm

Note: Please close PyCharm before Chinese language, and as a noble developer, try not to use

1. Obtain the Chinese package: see the end of the article

2. Place the Chinese package "resources_cn.jar" under lib in the installation directory

What are the tips for using Pycharm, the Python integrated development environment?

3. Restart PyCharm

What are the tips for using Pycharm, the Python integrated development environment?

##5. Usage Tips

1. How to change the Python interpreter:

In File->Settings->Project: Find Project Interpreter under xxx. Then modify it to the Python interpreter you need.

Note: What you must pay attention to here is: when selecting the Python interpreter, you must select the python.exe file, not the python installation folder.

What are the tips for using Pycharm, the Python integrated development environment?

2. How to adjust the editor font and its size

What are the tips for using Pycharm, the Python integrated development environment?

3. How to adjust the console font and its size Size

What are the tips for using Pycharm, the Python integrated development environment?

4. How to set the file encoding

What are the tips for using Pycharm, the Python integrated development environment?

5. How to modify the file background color

What are the tips for using Pycharm, the Python integrated development environment?

6. How to replace 4 space keys with one tab key

What are the tips for using Pycharm, the Python integrated development environment?

7. How to customize the Python template file

What are the tips for using Pycharm, the Python integrated development environment?

#!usr/bin/env python
# -*- coding: utf-8 -*-#

#-------------------------------------------------------------------------------
# FileName:         ${NAME}.py
# Description:  
# Author:       ${USER}
# Date:         ${DATE}
#-------------------------------------------------------------------------------

import sys
from PyQt4.QtGui import *
from PyQt4.QtCore import *
Copy after login

Since PyQt is commonly used for software interface development, the following three lines of commonly used code have been added.

In addition, commonly used template variables are as follows:

  • ${PROJECT_NAME} - Current Project name;

  • ${NAME} - the file name specified in the dialog box for creating the file;

  • ${USER} - the current user name;

  • ${DATE} - the current system date;

  • ${TIME} - the current system time;

  • ${YEAR} - year;

  • ##${MONTH} - month;

  • ##${DAY} - day;
  • ${HOUR} - hours;
  • ${MINUTE} - minutes;
  • ${PRODUCT_NAME} - IDE name of created file;
  • ${MONTH_NAME_SHORT} - English month abbreviation, such as: Jan, Feb, etc;
  • ${ MONTH_NAME_FULL} - The full name of the month in English, such as: January, February, etc;
  • 8. Display the line number

Right-click on the place where the line number is displayed and check Show Line number.

What are the tips for using Pycharm, the Python integrated development environment?9. Install plug-ins

Settings->Plugins->Browse repositories, and then enter the plug-in you want to install.

What are the tips for using Pycharm, the Python integrated development environment?10. Copy the file path

Right click->copy path.

What are the tips for using Pycharm, the Python integrated development environment?11. Open

right click->Show In Explorer in the file manager.

12. View a statement or quote

Place the cursor in the middle of the word, and then press ctrl b or press the ctrl key and the left mouse button.

13. View project structure

What are the tips for using Pycharm, the Python integrated development environment?14. DEBUG

What are the tips for using Pycharm, the Python integrated development environment?15. Common shortcut keys

    ctrl c: Copy the selected content; when the content is not selected, copy the current line.
  • ctrl x: Cut the selected content; cut the current line when the content is not selected.
  • ctrl v: Paste
  • ctrl d: Copy the current line to the next line.
  • ctrl y: Delete the current line.
  • shift enter: jump to the next line.
  • ctrl /: Add a comment.
  • tab: Indent.
  • shift tab: Cancel indentation.
  • ctrl f: Find.
  • ctrl shift r: Find in the current project.
  • ctrl Minus sign: Collapse the current code block.
  • ctrl plus sign: Expand the current code block.
  • ctrl shift minus sign: Collapse all code blocks in the current file.
  • ctrl shift plus sign: Expand all code libraries of the current file.
  • ctrl z: Go back to the previous step
  • shift ctrl z: Go back to the next step
  • 6. Solve the problem that PyCharm is slow when downloading Python third-party libraries

Open Pycharm, click File --> Settings, select Project Interproter in the Project ** option on the left, and click " ” option, that is, the Install installation option. The specific steps are as shown below:

What are the tips for using Pycharm, the Python integrated development environment?Select the Manage Repositories option in the lower left corner

What are the tips for using Pycharm, the Python integrated development environment?At this time, you can find that pip in Python is the official source. When using pip to install in China, it is very slow, so it is recommended to change it to the source address in China.

The specific method is to click on the default official source, select uninstall, and then add the domestic source address. The specific steps are as shown in the figure below:

What are the tips for using Pycharm, the Python integrated development environment?Currently domestic pip Mirror sources include:

Tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple

Douban: http://pypi.douban.com/simple/
Ali: http:// mirrors.aliyun.com/pypi/simple/
Then add the domestic source address in the pop-up window below.

What are the tips for using Pycharm, the Python integrated development environment?At this point the source address has been updated, click OK.

Note: After the replacement, be sure to click the refresh button. The refreshed interface is as shown below:


What are the tips for using Pycharm, the Python integrated development environment?Select an installation package to download, and you will find Waiting times are significantly reduced.

At this point, if the above method still does not solve the problem, create a new file pip.ini in the %HOMEPATH%\pip\ directory of the Windows system and add the following content to the file.

[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = https://pypi.tuna.tsinghua.edu.cn
Copy after login

What are the tips for using Pycharm, the Python integrated development environment?

注意:通过PyCharm下载的包位于项目的虚拟环境中。

What are the tips for using Pycharm, the Python integrated development environment?

The above is the detailed content of What are the tips for using Pycharm, the Python integrated development environment?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1269
29
C# Tutorial
1249
24
PHP and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

Choosing Between PHP and Python: A Guide Choosing Between PHP and Python: A Guide Apr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

How to run sublime code python How to run sublime code python Apr 16, 2025 am 08:48 AM

To run Python code in Sublime Text, you need to install the Python plug-in first, then create a .py file and write the code, and finally press Ctrl B to run the code, and the output will be displayed in the console.

PHP and Python: A Deep Dive into Their History PHP and Python: A Deep Dive into Their History Apr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

Python vs. JavaScript: The Learning Curve and Ease of Use Python vs. JavaScript: The Learning Curve and Ease of Use Apr 16, 2025 am 12:12 AM

Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.

Golang vs. Python: Performance and Scalability Golang vs. Python: Performance and Scalability Apr 19, 2025 am 12:18 AM

Golang is better than Python in terms of performance and scalability. 1) Golang's compilation-type characteristics and efficient concurrency model make it perform well in high concurrency scenarios. 2) Python, as an interpreted language, executes slowly, but can optimize performance through tools such as Cython.

Where to write code in vscode Where to write code in vscode Apr 15, 2025 pm 09:54 PM

Writing code in Visual Studio Code (VSCode) is simple and easy to use. Just install VSCode, create a project, select a language, create a file, write code, save and run it. The advantages of VSCode include cross-platform, free and open source, powerful features, rich extensions, and lightweight and fast.

How to run python with notepad How to run python with notepad Apr 16, 2025 pm 07:33 PM

Running Python code in Notepad requires the Python executable and NppExec plug-in to be installed. After installing Python and adding PATH to it, configure the command "python" and the parameter "{CURRENT_DIRECTORY}{FILE_NAME}" in the NppExec plug-in to run Python code in Notepad through the shortcut key "F6".

See all articles