Installation and Use of Python package manager pip

Source: Internet
Author: User
Tags install pandas
This article describes how to install and use pip in the Python package manager.

During this time, I was busy with providing services to my friends. after a long time, I had to write a blog for a long time. There are two tasks: one is the automatic mail sending script and the other is the data processing software. The non-Python system library is used when data processing software is used. it is a third-party library, pandas and numpy. In fact, pandas contains numpy, later I found that after installing numpy in the source code, I couldn't install pandas. I checked it and unmounted numpy. I used a Python package manager to manage the third-party packages, download this series of third-party packages. Unfortunately, there is time now. I will introduce this package manager to you here.

Pip is currently the most popular Python package management tool. it is used as a substitute for easy_install, but there are still a lot of functions built on setuptools.

Install

Official website installation: https://pip.pypa.io/en/latest/installing/

The official website is very detailed. here I will use the old version to install it ~

I will introduce the installation of Python pip in CentOS. to ensure the versatility of the platform, I will use the source code to install pip.

Cd to the directory where you want to download pip.


# cd  /usr/local/src


#wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz


# tar -xzvf pip-1.5.4.tar.gz# cd pip-1.5.4# python setup.py install

How do I install it? I am also an easy-to-use person ~

Run the following command in CentOS to install CentOS:


#python -m pip install --upgrade pip

Or


#yum install python-pip

Yes, depending on your preferences ~

Use

Pip installs a third-party package


# pip install SomePackage

List installed packages


# pip list

View installed package details


# pip show --files SomePackage

Pip upgrade package


# pip install --upgrade SomePackage

Pip uninstall package


pip uninstall SomePackage

Okay. now, the Python package manager pip is finished. it is indeed very short, but it is very useful ~

The above describes how to install and use pip in the Python package manager. For more information, see other related articles in the first PHP community!

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.