当前位置: 首页 > news >正文

配置国内镜像源加速Python包安装

pip install pandas sentence-transformers scikit-learn openpyxl

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

清华源

https://pypi.tuna.tsinghua.edu.cn/simple

阿里源

http://mirrors.aliyun.com/pypi/simple/

配置国内镜像源加速Python包安装

使用国内镜像源可以显著提升pip安装Python包的速度。以下是两种常用镜像源的配置方法和使用示例:

清华源

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

阿里源

pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/

安装指定包组命令

执行以下命令安装pandas等常用数据科学包:

pip install pandas sentence-transformers scikit-learn openpyxl

临时使用镜像源方法

若不想修改全局配置,可在安装命令中临时指定源:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple package_name

验证配置是否生效

检查当前pip源配置:

pip config list

常见问题解决

安装时出现SSL错误可尝试添加信任参数:

pip install --trusted-host pypi.tuna.tsinghua.edu.cn -i https://pypi.tuna.tsinghua.edu.cn/simple package_name

http://www.lryc.cn/news/604830.html

相关文章:

  • Three.js 与 React:使用 react-three-fiber 构建声明式 3D 项目
  • 数据仓库深度探索系列:架构选择与体系构建
  • 标准七层网络协议和TCP/IP四层协议的区别
  • rsync+sersync实现文件实时同步
  • C++实战:抖音级视频应用开发精髓
  • 力扣219:存在重复元素Ⅱ
  • 基于deepseek的事件穿透分析-风险传导图谱
  • Java源码构建智能名片小程序
  • FastAPI入门:表单数据、表单模型、请求文件、请求表单与文件
  • CVAE 回顾版
  • springcloud03-Nacos配置中心
  • Apache Ignite 2.8 引入的新指标系统(New Metrics System)的完整说明
  • 如何通过项目管理系统提升交付率
  • 【ip】IP地址能否直接填写255?
  • Ubuntu22.04中搭建GN编译环境
  • 用Python+MySQL实战解锁企业财务数据分析
  • 深入浅出:C++ STL简介与学习指南
  • 文件加密工具(勒索病毒加密方式)
  • Dify 从入门到精通(第 4/100 篇):快速上手 Dify 云端:5 分钟创建第一个应用
  • VS2022 libtorch-win-shared-with-deps-2.7.1+cu126 配置记录
  • 程序开发中常用的 Emoji 符号
  • Python爬虫04_Requests豆瓣电影爬取
  • 生成模型实战 | GLOW详解与实现
  • JavaFX CSS @font-face 错误全面分析 loadStylesheetUnPrivileged / reportException
  • 快速删除Word和WPS文字中的空白行
  • Redis实现数据传输简介
  • Kubernetes高级调度02
  • Elasticsearch 索引管理 API 实战:涵盖创建、查看、修改、删除及别名
  • Redis 面试全解析:从数据结构到集群架构(含实战解决方案)
  • 设计模式之单例模式及其在多线程下的使用