pip配置、命令

Friday, Sep 3, 2021 | 1 minute read | Updated at Friday, Sep 3, 2021

@
pip配置、命令

镜像配置

# windows 路径 C:\Users\username\pip\pip.ini
# linux  路径 ~/.pip/pip.conf 

[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

pip 命令

pip list –outdated #列出所有过期的库 pip install –upgrade 库名 #升级库

一键升级过期源

import pip
from subprocess import call
 
for dist in pip.get_installed_distributions():
    call("pip install --upgrade " + dist.project_name, shell=True)

© 2016 - 2025 Caisong's Blog

🌱 Powered by Hugo with theme Dream.

About Me

大龄程序员,喜欢折腾各种环境部署、软件应用。

博客记录日常。