Detailed explanation of the update command for the software (library) under linux
Sudo apt-get install package name or sudo pip install package name is often used when installing packages under a ubuntu server, so what's the difference between the two?
1. Difference
Pip is used to install all dependent packages from PyPI (https://www.python.org/) python, and you can choose to install any previous version of dependent packages that have been uploaded on PyPI, personally considered to be python-related packages and third-party packages as well as various versions
Apt-get can be used to install software, update sources, or update typical dependency packages from Ubuntu (https://launchpad.net/ubuntu). A typical installation means that it is only installing (the latest release, or the most recent) a single version, and we cannot decide which version of the dependency package we want to install or choose the previous version.
Personally, it is easy to distinguish: after all, one is to update a system-level package, and the other is to update a programming language-level package (library).
two。 Installation and application
Apt-get can be used directly in the 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 package $apt-get source package # download the source code of the package $sudo apt-get build-dep package # install the relevant compilation environment $sudo apt-get clean & & sudo apt-get autoclean # clean up useless packages
Pip needs to be installed to use. The installation process is as follows (for 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
Install 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 views the information of the library
The above update order for the software (library) under linux is all the content shared by the editor. I hope I can give you a reference and support it.