如何在Mac中修改pip的镜像源

一. 修改步骤

  1. 进入命令行

  2. 进入到用户根目录

    bash 复制代码
    cd ~/
  3. 在用户根目录下创建 .pip 文件夹

    bash 复制代码
    mkdir .pip
  4. 进入到 ~/.pip 文件夹内

    bash 复制代码
    cd ~/.pip
  5. 创建 pip.conf 文件

    bash 复制代码
    vim pip.conf
  6. pip.conf 文件中添加清华大学的镜像源,如下:

    bash 复制代码
    [global]
    index-url=https://pypi.tuna.tsinghua.edu.cn/simple/
    [install]
    trusted-host=pypi.tuna.tsinghua.edu.cn

二. 其他国内镜像源

相关推荐
aosky1 天前
手机远程畅玩OpenAI Codex
macos·智能手机·cocoa
tryCbest1 天前
Pip生成requirements.txt文件
python·pip
A懿轩A1 天前
【2026 最新】Python 下载与安装:在 macOS 下使用 Homebrew 和 pyenv 完美管理多版本 Python
python·macos·mac
IKaros_α‌1 天前
mac上安装openclaw从入门到删除
macos
x-cmd1 天前
macOS 内存模型深度解析 | x free 设计哲学
linux·macos·内存·策略模式·free·x-cmd
itinymeng1 天前
在 macOS 上遇到 brew: command not found 错误,通常是因为 ‌Homebrew 未安装‌ 或 ‌PATH 环境变量未正确配置‌
macos
oscar9991 天前
Claude Code 的“计算机使用”功能:让命令行助手真正操控macOS桌面
macos·claude code·computer
老兵发新帖2 天前
软件开发国内常用镜像源配置及回退方法(MAC版)
macos·软件工程
qq_411262422 天前
ESP32-C5 软件配置MAC 地址
macos
鸠摩智首席音效师2 天前
如何在 MacOS 上安装 PostgreSQL ?
数据库·macos·postgresql