Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation steps and use details of pip under linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Preface

Pip is similar to yum in RedHat, so it is very convenient to install software. This section describes in detail the installation and use of pip. I hope this article will help you understand the installation and use of pip. Without saying much, let's take a look at the detailed introduction:

1. Download and install pip

1.1 pip download

# wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb"-- no-check-certificate

1.2 pip installation

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

II. Detailed explanation of pip use

2.1 pip installation software

# pip install SomePackage [...] Successfully installed SomePackage

2.2 pip to view installed software

# pip show-- files SomePackage Name: SomePackage Version: 1.0 Location: / my/env/lib/pythonx.x/site-packages Files:.. / somepackage/__init__.py [...]

2.3 pip checks which software needs to be updated

# pip list-outdated SomePackage (Current: 1.0 Latest: 2.0)

2.4 pip upgrade softwar

# pip install-- upgrade SomePackage [...] Found existing installation: SomePackage 1.0 Uninstalling SomePackage: Successfully uninstalled SomePackage Running setup.py install for SomePackage Successfully installed SomePackage

2.5 pip Uninstall Software

$pip uninstall SomePackage Uninstalling SomePackage: / my/env/lib/pythonx.x/site-packages/somepackage Proceed (yzone)? Y Successfully uninstalled SomePackage

III. Examples of pip usage

3.1 install Redis

# pip install redis

3.2 Uninstall redis

# pip uninstall redisUninstalling redis: / usr/lib/python2.6/site-packages/redis-2.9.1-py2.6.egg-info. Omit some content. Proceed (YPao)? Y Successfully uninstalled redis

3.3 View the software to be updated

Pip list-- outdatepygpgme (Current: 0.1 Latest: 0.3) pycurl (Current: 7.19.0 Latest: 7.19.3.1) iniparse (Current: 0.3.1 Latest: 0.4)

IV. Common mistakes

4.1 ImportError No module named setuptools

Please refer to "ImportError No module named setuptools solution"

5. Interpretation of pip parameters

# pip-- help Usage: pip [options] Commands: install installation software. Uninstall uninstalls the software. Freeze outputs a list of installed software in a certain format, list lists the installed software. Show displays software details. Search search software, similar to search in yum. Wheel Build wheels from your requirements. Zip does not recommend it. Zip individual packages. Unzip does not recommend it. Unzip individual packages. Bundle does not recommend it. Create pybundles. Help current help. General Options:-h,-- help shows help. -v,-- verbose more output, you can use up to 3 times-V,-version real-world version information and then exit. -Q,-- the least output of quiet. -- log-file overrides the verbose error log. The default file: / root/.pip/pip.log-- log does not overwrite the log that records verbose output. Proxy Specify a proxy in the form [user:passwd@] proxy.server:port. -- timeout connection timeout (default 15 seconds). Exists-action Default action when a path already exists: (s) witch, (I) gnore, (w) ipe, (b) ackup. -- cert certificate.

Summary

Installation and use is clear at a glance, too easy. The boss doesn't want me to install software anymore.

All right, that's all of this article. I hope the content of this article can bring some help to your study or work. If you have any questions, you can leave a message and exchange messages. Thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report