Xiaobian himself is a Python development engineer, I spent three days to organize a set of Python learning tutorials, from the most basic Python scripts to Web development, crawler, data analysis, data visualization, machine learning, etc., these materials can be “click” to get the friends who want
1. Pycharm setting
Pycharm is normally set up for the first use, which is tailored to your needs. Here are some instructions for my own setup:
Enter the setting from setting under file, as shown below:
Then we enter the Settings screen, first we can set the interface style and toolbar font size, as shown in the red line
Next we will generally set the font style when writing code, choose the appropriate font and size and spacing, which is conducive to the writing of the program when the mood is happy, write up a yo…
Next we need to specify our encoding form, so that our code will compile and write easily
After all, UTF-8 encoding and decoding mode conforms to Chinese coding habits, and then we want to write some information about the file in the header every time we write code, such as time, compiler, etc., so that we can write a writing
Template, so that every time we create a new file, we automatically add this information to the header of the file. In this case, the py file can follow this pattern
For convenience, I’ll just say that they can be typed out directly, and you can copy them directly!
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# author: Albert time:${DATE}
Copy the code
And then the big part, we need to specify the compiler, that’s the soul operation,
Since my Python installation is using Anaconda, I can specify the Python path in Anaconda directly. If you want to load other compilers, you can click show all below and load it.
Pycharm use and shortcut keys
Pycharm lets you load third-party libraries used by Python by clicking on the plus sign on the right after specifying the compiler and going to the search box to find the third-party libraries you want to load. However, this method is too slow and we usually install PIP and images on terminals, so we won’t go into details here.
As for shortcut keys, different versions may be slightly different, commonly used several:
(1), comment: After selected Ctrl + /
(2), positioning: Ctrl + left mouse button
(3), indent: Tab/Tab+ Shift
(4), newline: Shift + Enter
(5), compile: Ctrl+ Shift +F10
(6), view the path: CTRL + L (or enter PWD on terminal)
I can’t remember anything else, you can check it in Settings
3. Some problems with PyCharm
(1) Sometimes when we write code, we will find some tilde (non-coding error) under the code. The quick solution is to click on the lower right corner of the interface to lower the highlight level to syntax error.
The cure is to remove pyCharm from the Settings, but it’s not recommended. I used pyCharm.
(2) Failed to compile when running code
When we want to run code, we can right click the mouse to run the current file, but sometimes the following situation occurs
All we need to do is change the name of the py file.
Pycharm Sets the background image
As a Python developer, I spent three days to compile a set of Python learning tutorials, from the most basic Python scripts to Web development, crawlers, data analysis, data visualization, machine learning, etc. These materials can be “clicked” by the friends who want them