Install Python and pip packages and related commands in Linux

Source: Internet
Author: User

Install Python and pip packages and related commands in Linux

>>> Ora 23 is updated with python 2,. 7.11.3, but for python package installation, pip package is required to manage python package resources.
Pip package installation.
The methods for python2.x and python 3.x are different:

Python 2:

Sudo dnf upgrade python-setuptools
Sudo dnf install python-pip python-wheel
Python 3: sudo dnf install python3 python3-wheel # python3 comes pip

Pip command:

Pip install SomePackage # install a package (Latest Version)
Pip install somepackage = 1.4 # install a package in version 1.4
Pip show -- files SomePackage # view installed packages
Pip install -- upgrade SomePackage # update a package
Pip uninstall SomePackage # uninstall a package
Pip install SomeProject> = 1, <2 # install packages between two versions
Pip install 'someproject ~ = 1.4.2 '# Install a package of a similar version
Pip install -- index-url http://my.package.repo/simple/ SomeProject # url Installation
# Install another one at the same time
Pip install -- extra-index-url http://my.package.repo/simple SomeProject
 
# Local src tree Installation
Pip install-e or
Pip install
Pip install./downloads/SomeProject-1.0.4.tar.gz # local archive Installation
# Install from the local directory (3)
Pip install -- no-index -- find-links = file: // local/dir/SomeProject
Pip install -- no-index -- find-links =/local/dir/SomeProject
Pip install -- no-index -- find-links = relative/dir/SomeProject
 
Pip install -- pre SomeProject # pre-install as required.
$ Pip install SomePackage [PDF] $ pip install SomePackage [PDF] == 3.0 $ pip install-e. [PDF] == 3.0 # editable project in current directory

Main sources:

Https://packaging.python.org/en/latest/install_requirements_linux/#installing-pip-setuptools-wheel-with-linux-package-managers

Https://packaging.python.org/en/latest/installing/#installing-from-vcs

Python core programming version 2. (Wesley J. Chun). [Chinese version of hd pdf]

Python development technology details. (Zhou Wei, Zong Jie). [hd PDF scan version + book guide video + code]

Use Python for file backup

Obtain Linux information using a Python script

Build a desktop algorithm transaction research environment using Python in Ubuntu

Python details: click here
Python: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.