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

How to implement pip installation, upgrade and upgrade fixed packages in python

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces how to achieve python pip installation, upgrade and upgrade fixed package, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

1. Pip download and installation 1.1 pip download

Go to https://pypi.python.org/pypi/pip and download the .tar.gz package

1.2 Linux installation pip# tar-xzvf pip-1.5.4.tar.gz decompress # cd pip-1.5.4 enter the decompression file # python setup.py install installation 1.3 upgrade pip

Python-m pip install-- upgrade pip

2. Pip uses detailed 2.1 pip installation package # pip install installation package name [...] Successfully installed SomePackage # installed successfully 2.2 pip check whether # pip show-- files installation package name Name:SomePackage # package name Version:1.0 # version number Location:/my/env/lib/pythonx.x/site-packages # installation location Files: # include files, etc. / somepackage/__init__.py [...] 2.3 pip check which Some packages need to be updated # pip list-- outdated2.4 pip upgrade package # pip install-- the name of the package to be upgraded by upgrade

Package name the latest version number of the currently installed version

2.5 pip Uninstall package # pip uninstall the name of the package to uninstall 3. Pip usage instance

3.1 install redis

# pip install redis

3.2 Uninstall redis

# pip uninstall redisUninstalling redis: / usr/lib/python3.6/site-packages/redis-2.9.1-py3.6.egg-info.Proceed (yzone)? Y Successfully uninstalled redis # uninstalled successfully 4. Pip parameter explanation # pip-- help Usage: pip [options] Commands: install installation package. Uninstall uninstalls the package. Freeze outputs a list of installed packages in a certain format, list lists installed packages. Show displays package details. Search search package, similar to search in yum. Wheel Buildwheelsfromyourrequirements. Zip does not recommend .Ziproomalkeeper. Unzip does not recommend. Unzipqualified. Bundle does not recommend. Createpybundles. Help current help. GeneralOptions:-HMAT help shows help. -vmam talk verbose more output, you can use up to 3 times-Vmam tel tel version real-life version information then exit. The least output of QMAT Murray is available. -- 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 Specia proxyintheform [user: passwd@] proxy.server:port. -- timeout connection timeout (default 15 seconds). Exists-action Defaultactionwhenapathalreadyexists: (s) witch, (I) gnore, (w) ipe, (b) ackup. -- cert certificate.

Use the pip uninstall package name command to uninstall the package

You can view installed third-party packages with the pip list command

Use the pip list-- outdated command to see which packages need to be updated

Thank you for reading this article carefully. I hope the article "how to install, upgrade and upgrade the fixed package of pip in python" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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

Development

Wechat

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

12
Report