


This article brings you relevant knowledge about python, which mainly introduces issues related to the installation and use of pip, including upgrading pip, displaying installation package information, and viewing specified packages. Let’s take a look at the detailed information and so on. I hope it will be helpful to everyone.
Recommended learning: python video tutorial
1. Brief introduction
pip is a Python package management tool. This tool provides the functions of searching, downloading, installing and uninstalling Python packages. All the packages you use now either come with them or are installed through pip. Python 2.7.9 or Python 3.4 or above comes with the pip tool.
2. Download and install
You can use the command pip --version to determine whether it has been installed:
If you still If it is not installed, you can use the following two methods to install it:
1. Python comes with a ensurepip module, which can install pip in the Python environment. Enter the following command in cmd
py -m ensurepip --upgrade
2. You can also download a Python script and use the command line boot logic to install pip.
- Download the script to your Python folder
- win cmd to open the terminal and switch to the directory of your script
- Enter the command and press Enter
py get-pip.py
3. The most commonly used commands
1. Display version and path
pip --version
2. Get help
pip --help
3. Upgrade pip
pip install -U pip
ps:升级需谨慎,经常看到pip提醒升级,然后输入命令回车,系统开始下载最新版安装包, 准备安装前卸载了旧版pip,然后新版又报错无法安装,只好又重装。
4. Installation package
pip install SomePackage #The latest version
pip install SomePackage==1.0.4 #Specify the version
pip install 'SomePackage>=1.0.4' #The smallest version
For example, I want to install sklearn , enter pip install sklearn, the latest version of the package
5, upgrade package
pip install --upgrade SomePackage
升级指定的包,通过使用==, >=, , <h2 id="Uninstall-package">6. Uninstall package</h2><p><strong><span style="color:blue">pip uninstall SomePackage</span></strong></p><h2 id="Search-package">7. Search package</h2><p><strong><span style="color:blue">pip search SomePackage</span></strong></p><h2 id="Display-installation-package-information">8. Display installation package information</h2><p><strong><span style="color:blue">pip show SomePackage</span></strong><br><img src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/000/067/242888d8bfa43019edc970c8ab5edb0f-5.png?x-oss-process=image/resize,p_40" class="lazy" alt="One article to complete the installation and use of pip in Python"></p><h2 id="List-installed-packages">9. List installed packages</h2><p><strong><span style="max-width:90%">pip list</span></strong><br><img src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/000/067/7361c4a9e66a41cb77df500fca51e01a-6.png?x-oss-process=image/resize,p_40" class="lazy" alt="One article to complete the installation and use of pip in Python"></p><h2 id="View-detailed-information-of-the-specified-package">10. View detailed information of the specified package</h2><p><strong>##pip show -f SomePackage<span style="max-width:90%"></span></strong><br><img src="/static/imghwm/default1.png" data-src="https://img.php.cn/upload/article/000/000/067/7361c4a9e66a41cb77df500fca51e01a-7.png?x-oss-process=image/resize,p_40" class="lazy" alt="One article to complete the installation and use of pip in Python"></p>Recommended learning:<p> python video tutorial<a href="https://www.php.cn/course/list/30.html" target="_blank"></a></p>
The above is the detailed content of One article to complete the installation and use of pip in Python. For more information, please follow other related articles on the PHP Chinese website!

本篇文章给大家带来了关于Python的相关知识,其中主要介绍了关于Seaborn的相关问题,包括了数据可视化处理的散点图、折线图、条形图等等内容,下面一起来看一下,希望对大家有帮助。

本篇文章给大家带来了关于Python的相关知识,其中主要介绍了关于进程池与进程锁的相关问题,包括进程池的创建模块,进程池函数等等内容,下面一起来看一下,希望对大家有帮助。

本篇文章给大家带来了关于Python的相关知识,其中主要介绍了关于简历筛选的相关问题,包括了定义 ReadDoc 类用以读取 word 文件以及定义 search_word 函数用以筛选的相关内容,下面一起来看一下,希望对大家有帮助。

VS Code的确是一款非常热门、有强大用户基础的一款开发工具。本文给大家介绍一下10款高效、好用的插件,能够让原本单薄的VS Code如虎添翼,开发效率顿时提升到一个新的阶段。

pythn的中文意思是巨蟒、蟒蛇。1989年圣诞节期间,Guido van Rossum在家闲的没事干,为了跟朋友庆祝圣诞节,决定发明一种全新的脚本语言。他很喜欢一个肥皂剧叫Monty Python,所以便把这门语言叫做python。

本篇文章给大家带来了关于Python的相关知识,其中主要介绍了关于数据类型之字符串、数字的相关问题,下面一起来看一下,希望对大家有帮助。

本篇文章给大家带来了关于Python的相关知识,其中主要介绍了关于numpy模块的相关问题,Numpy是Numerical Python extensions的缩写,字面意思是Python数值计算扩展,下面一起来看一下,希望对大家有帮助。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver CS6
Visual web development tools

Atom editor mac version download
The most popular open source editor

SublimeText3 English version
Recommended: Win version, supports code prompts!
