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:
|
>>: Vue Element front-end application development: Use of API Store View in Vuex
1. Display the files or directories in the /etc d...
Preface The count function is used to count the r...
Achieve results Implementation Code <h1>123...
Sometimes in our actual work, we need to import d...
The “Cancel” button is not part of the necessary ...
Today I made a Spring Festival gold coin red enve...
It is recommended to use the sudo su command to s...
I just want to make a small thing that combines w...
Solution function mergeImgs(list) { const imgDom ...
The two parameters innodb_flush_log_at_trx_commit...
Table of contents Preface 1. Introduction to one-...
Lottie is an open source animation library for iO...
Introduction Binlog logs, that is, binary log fil...
I wrote some Qt interface programs, but found it ...
Table of contents Difference between char and var...