Detailed explanation of the update command for software (library) under Linux

Detailed explanation of the update command for software (library) under Linux

When installing packages on an Ubuntu server, you often use sudo apt-get install package name or sudo pip install package name. What is the difference between the two?

1. Difference

pip is used to install all Python dependency packages from PyPI (https://www.python.org/), and can choose to install any previous version of dependency packages uploaded on PyPI, which I personally think are Python-related packages and third-party packages and various versions;

apt-get can be used to install software, update sources, and can also be used to update typical dependency packages from Ubuntu (https://launchpad.net/ubuntu). Typical installation means that it only installs a single version (the latest release, or the most recent one), and we cannot decide the version of the dependency package we want to install or choose a previous version.

Personally, I think they are easy to distinguish: after all, one is updating the system-level package, and the other is updating a programming language-level package (library).

2. Installation and application

apt-get can be used directly in the following format:

$ sudo apt-get install/delete package
$ sudo apt-get -f install #Repair installation$ sudo apt-get dist-upgrade #Upgrade system$ sudo apt-get upgrade #Update installed packages$ apt-get source package #Download the source code of the package$ sudo apt-get build-dep package #Install related compilation environment$ sudo apt-get clean && sudo apt-get autoclean #Clean up useless packages

pip needs to be installed before it can be used. The installation process is as follows (applicable to Ubuntu 10.10 and above), using the format: pip install package.

$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip

Installing Python library under Linux

sudo apt-get install python-numpy 
sudo apt-get install python-scipy 
sudo apt-get install python-matplotlib 
sudo apt-get install python-pip

other

pip list lists all libraries

pip show torch View library information

The above detailed explanation of the update commands for software (libraries) under Linux is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of how to upgrade software package versions under Linux
  • A complete collection of commonly used Linux commands (super comprehensive)
  • Very practical Linux system operation and maintenance common commands and common sense (super practical)

<<:  mysql settings to change the root password, mysql server connection, mysql common commands diagram

>>:  Vue Element front-end application development: Use of API Store View in Vuex

Recommend

Detailed explanation of how to customize the style of CSS scroll bars

This article introduces the CSS scrollbar selecto...

Use href to simply click on a link to jump to a specified place on the page

After clicking the a tag in the page, you want to ...

Solve the problem of IDEA configuring tomcat startup error

The following two errors were encountered when co...

MySql Sql optimization tips sharing

One day I found that the execution speed of a SQL...

Detailed explanation of pid and socket in MySQL

Table of contents 1. Introduction to pid-file 2.S...

Javascript scope and closure details

Table of contents 1. Scope 2. Scope Chain 3. Lexi...

Detailed explanation of CocosCreator Huarongdao digital puzzle

Table of contents Preface text 1. Panel 2. Huaron...

Docker installation and configuration steps for MySQL

Table of contents Preface environment Install Cre...

Some wonderful uses of URL objects in JavaScript

Table of contents Preface Parsing parameters Modi...

Comprehensive understanding of HTML Form elements

As shown below: XML/HTML CodeCopy content to clip...

Example analysis of mysql shared lock and exclusive lock usage

This article uses examples to illustrate the usag...