I have been busy doing things for my friends during this period. I have been busy for a long time and I haven’t written a blog for a long time. I made two things, one is an automatic email sending script, and the other is data processing software. Among them, when making data processing software, non-Python system libraries were used, which are two third-party libraries, pandas and numpy. In fact, pandas includes numpy. I didn’t understand it at first, but later I found that after installing numpy from the source code, I installed pandas. I couldn't install it, so I checked it out. Then I uninstalled numpy, then used a Python package manager to manage third-party packages, and downloaded this series of third-party packages. Unfortunately, I just have time now, so I would like to introduce this package manager to you.
pip is currently the most popular Python package management tool. It is used as a replacement for easy_install, but there are still a large number of functions built on setuptools.
Official website installation introduction: https://pip.pypa.io/en/latest/installing/
The official website introduces it in detail, I will use it here again Install it the old version way~
What I am introducing here is the installation of Python pip under CentOS. In order to maintain the versatility of the platform, I use the source code to install pip.
cd to the directory where you want to download pip, personal suggestion
# 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 a person who saves trouble~
Use the following command to install in CentOS
#python -m pip install --upgrade pip
or
#yum install python-pip
It all depends on your preference~
pip to install a third-party package
# pip install SomePackage
column Check out the installed packages
# pip list
View the details of the installed packages
# pip show --files SomePackage
pip upgrade package
# pip install --upgrade SomePackage
pip uninstall package
pip uninstall SomePackage
OK, this is the end of the Python package manager pip. Indeed, it is very short. , but it’s very useful~
The above is the detailed content of Installation and use of Python package manager pip. For more information, please follow other related articles on the PHP Chinese website!