The Linux operating system uses Python to implement the visualization function of the task manager

The Linux operating system uses Python to implement the visualization function of the task manager

1. Python installation

1. Create a folder.

mkdir python 

Enter the folder and decompress it:

tar zxvf Python-3.6.5.tar

Enter the Python-3.6.5 folder and enter:

./configure

Next, a lot of processes will appear, and finally you will be prompted to run a command. Just enter the command as prompted.

Enter the make command (if the prompt does not exist, just use apt install make to install it) and wait.

make && make install #compile and install

Just continue to wait for the installation to complete.

At this time, we cd to the root directory to check our own python version (because python 2.7 cannot implement the library functions of versions above 3.0)

python -V

I found that it is still 2.7. What is the reason?

This is because the pyton3.6 version you installed has not been modified to the system default version

At this time, you need to delete the python related files in the /usr/bin/ directory

cd /usr/bin
ls -al *python* #View the version pointed to by the existing soft link rm python #Delete the old soft link ln -s python3.6 python #Create a new soft link

Then check the current version, it is the normal version.

2. Install pycharm

After decompression, enter the pycharm directory:

cd pycharm-community-2019.2.5/bin
bash pycharm.sh #Execute the program

But it is troublesome to enter the directory every time you open it, so we create a "shortcut":

3. Install third-party libraries

When the system installs Python 3.6 by default, its built-in pip is also pip 3 (if there is no pip, use the apt install pip3 command to install it). Because errors always occur when using pip for installation, it is recommended to download the installation package from the official website and install it yourself.

Here are some examples:

After downloading the file, go directly to this directory:

Just install it!

pip install PyQt... #done

Summarize

The above is what I introduced to you about how to use Python to visualize the task manager in the Linux operating system. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Python logs in to Linux through SSH and implements operations
  • Python uses paramiko to operate Linux
  • How to install Python 3.4.2 on Linux
  • How to install or upgrade Python 2.7 under Linux
  • Using PIPE in Python to operate Linux pipes
  • Method of interactive execution of Python file reading and writing operations and Linux shell variable commands
  • Using Python to remotely operate Linux process analysis

<<:  Swiper+echarts realizes the left and right scrolling effect of multiple dashboards

>>:  3 common errors in reading MySQL Binlog logs

Recommend

HTML table tag tutorial (19): row tag

The attributes of the <TR> tag are used to ...

VUE+Canvas implements the game of God of Wealth receiving ingots

Welcome to the previous canvas game series: 《VUE ...

Solution to the problem that Navicat cannot remotely connect to MySql server

The solution to the problem that Navicat cannot r...

Docker Nginx container production and deployment implementation method

Quick Start 1. Find the nginx image on Docker Hub...

Solve the problem that PhpStorm fails to connect to VirtualBox

Problem description: When phpstorm's SFTP hos...

vue2.x configuration from vue.config.js to project optimization

Table of contents Preface vue.config.js configura...

Analysis of three parameters of MySQL replication problem

Table of contents 01 sql_slave_skip_counter param...

Vue3+script setup+ts+Vite+Volar project

Table of contents Create a vue + ts project using...

Summary of methods for finding and deleting duplicate data in MySQL tables

Sometimes we save a lot of duplicate data in the ...

JavaScript to achieve simple drag effect

This article shares the specific code of JavaScri...

Alibaba Cloud Centos7.3 installation mysql5.7.18 rpm installation tutorial

Uninstall MariaDB CentOS7 installs MariaDB instea...