A few days ago, we installed Ubuntu 20.04 with a virtual machine. Today, we will install some commonly used tools, such as Pycharm. Pycharm is an IDE for developing Python. It boils down to two words, easy to use!
Download Pycharm
The official download address is: https://www.jetbrains.com/pycharm/download/#section=linux
Ubuntu 20.04 is a Linux operating system, we naturally choose the Linux version of Pycharm, as shown below:
**Note: ** The latest version is Version: 2020.1, installations of other versions are all types
Install Pycharm
pycharm-professional-2020.1.tar.gz pycharm-2020.1
jerry@jerry-virtual-machine:~/Desktop$
tar -zxvf pycharm-professional-2020.1.tar.gz
pycharm-2020.1/
$ sudo mkdir /opt/pycharm
jerry@jerry-virtual-machine:~/Desktop$ ls
pycharm-2020.1 pycharm-professional-2020.1.tar.gz
jerry@jerry-virtual-machine:~/Desktop$ sudo mv pycharm-2020.1//opt/pycharm/
jerry@jerry-virtual-machine:~/Desktop$
jerry@jerry-virtual-machine:~/Desktop$ cd /opt/pycharm/
jerry@jerry-virtual-machine:/opt/pycharm$ ls
pycharm-2020.1
Start and configure Pycharm
Let's continue with the above.
jerry@jerry-virtual-machine:/opt/pycharm$ sh /opt/pycharm/pycharm-2020.1/bin/pycharm.sh
That is, you can directly enter pycharm
in the terminal in the future, and start Pycharm after pressing Enter
This depends on personal needs, I have no choice; if you need it later, you can also install it in the IDE
Configure Python environment
If you are anxious to open a new project in Pycharm, the creation may fail and an error will be reported, such as "Error prompt: ModuleNotFoundError: No module named'distutils.util'". This is obviously because some modules are not installed. Let's install some common stuff first:
erry@jerry-virtual-machine:~/Desktop$ sudo apt install python3-pip
jerry@jerry-virtual-machine:~/Desktop$ sudo apt-get install python3-distutils
New Construction
Among them, the location can choose where you want to put it, and the others can use the default, then create
Create a new Python file
Write a classic "Hello world"
Run this file
For the first run, you need to right-click the file and select "Run'hello'". The result is as follows:
Note: You do not need to right-click in the future, you can directly click the green button in the upper right corner to run this file directly. Python does not need to be compiled, it runs directly, so cool. . .
Optimize Pycharm
There are some places where we can do better:
When we install Pycharm, there is an interface to choose the plug-in to install. In fact, we can install it ourselves, and the open path is: file — settings — plugings
Installing plugins is very simple, such as installing statistic:
The right plug-in will make Pycharm even more powerful. Regarding the content of the plug-in, I will not expand it in detail here, just list some plug-ins recommended by the great gods:
(1) statistic: Project statistics
(2) Rainbow Brackets: Let the code blocks clearly show various colors
(3). Ignore: People who use git know it, which is .gitignore
To be continued (add at any time)
summary
The installation and demonstration are complete, not too complicated. Even if it is, Pycharm is worthy of your own, who knows who uses it~~
So far, this article about installing Pycharm 2020.1 in Ubuntu 20.04 is introduced here. For more information about installing Pycharm 2020.1 in Ubuntu 20.04, please search for previous articles of ZaLou.Cn or continue to browse related articles below. Support ZaLou.Cn!
Recommended Posts