python - 安装pip插件

功能:安装各种插件,功能与 maven 类似

windows 环境下,安装包中自带这个插件,检查路径 ./Scripts,如果包含 pip.exe 文件,则无须安装

安装

官网:https://pip.pypa.io/en/stable/installation/

Download the script, from https://bootstrap.pypa.io/get-pip.py.

Open a terminal/command prompt, cd to the folder containing the get-pip.py file and run:

py get-pip.py

注意:点击链接可能直接打开文件,而不是下载,这种情况下,要使用界面另存,不要复制文本内容(不知道为啥,复制出来的文件会小很多)。

相关命令

# 更新到最新版本
pip3 install --upgrade pip  

#列出通过pip安装的软件包
pip list   

#列出pip安装的软件包,包含版本信息
pip freeze 

# 镜像
pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/
pip config set install.trusted-host pypi.mirrors.ustc.edu.cn

# 当前使用的镜像
pip config set install.trusted-host

常用源

阿里云:http://mirrors.aliyun.com/pypi/simple/

清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/

中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/

中国科学技术大学:http://pypi.mirrors.ustc.edu.cn/simple/

豆瓣:https://pypi.douban.com/simple/

posted on 2024-12-05 17:19  疯狂的妞妞  阅读(65)  评论(0)    收藏  举报

导航