Mac python3 环境配置

博客介绍了在macOS系统下安装pip3的相关内容,包括永久替换镜像源、临时更换镜像源的方法,还列举了国内的pip源,如阿里云、清华、中国科技大学等多个镜像源地址。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装pip3
curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py && sudo python3 /tmp/get-pip.py # 一键安装脚本
pip -V # 版本校验
永久替换镜像源
# 创建目录和配置文件
mkdir -p ~/.pip
vim ~/.pip/pip.conf
# 配置文件追加内容
[global]
timeout = 6000
index-url = https://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com
# 验证,执行后管辖下载地址
pip3 install django-excel
临时更换镜像源
pip3 install 库名 -i 镜像地址
pip3 install django-excel -i https://mirrors.aliyun.com/pypi/simple/
国内pip源
  • 阿里云:https://mirrors.aliyun.com/pypi/simple/
  • 清华:https://pypi.tuna.tsinghua.edu.cn/simple
  • 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
  • 华中理工大学:http://pypi.hustunique.com/
  • 山东理工大学:http://pypi.sdutlinux.org/
  • 豆瓣:http://pypi.douban.com/simple/
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值