首页
/
行业洞察
/
正文
INDUSTRY INSIGHT · 深度
Conda,pip永久享有清华源保姆级教程
📅 2026/9/29 7:38:05
✍️ 爱科研究院
👁 阅读 3,247
相信很多人和我一样饱受pip要查找清华源的苦吧今天博主也是为大家带来了永久享有清华源的办法爸妈再也不用担心我网络超时time out了有win和linux两个版本。临时调用清华源在cmd或pycharm的终端中输入如下命令pip install 包名[指定版本]-i https://pypi.tuna.tsinghua.edu.cn/simple[]中的内容可省省略表示安装支持的最新版。pip永久清华源pip configsetglobal.index-url https://pypi.tuna.tsinghua.edu.cn/simpleuv安装版编辑~/.config/uv/uv.toml[[index]]urlhttps://pypi.tuna.tsinghua.edu.cn/simpledefaulttrue其他可用源https://mirrors.aliyun.com/pypi/simple/ #阿里镜像 https://mirror.baidu.com/pypi/simple/ #百度镜像 https://pypi.mirrors.ustc.edu.cn/simple/ #中科大镜像 http://pypi.douban.com/simple/ #豆瓣镜像 http://mirrors.sohu.com/Python/ #搜狐镜像 https://pypi.hustunique.com/ #华中科大镜像 https://pypi.hustunique.com/ #山东理工大学镜像永久享有清华源Windows版旧版conda需要执行以下命令来生成.condarc文件conda config--setshow_channel_urlsyes新版conda不再支持以上命令可在C:\Users\用户名下找到该文件若没有直接创建即可将文件以记事本打开并将内容替换为以下内容channels: - defaults show_channel_urls:truedefault_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud就是有一个缺点配置后再创建虚拟环境会失败此时将该文件删掉用默认源来创建虚拟环境即可。实践中发现Miniconda3-py39_25.9.1-3-Windows-x86_64并不会出现这个问题Linux版本文将以root用户为例进行阐述依次执行如下命令cdroot#cd到当前用户的家目录pwd#确保处于root目录下ll#查看当前目录中是否有.pip文件夹mkdir.pip#没有就创建cd.piptouchpip.conf#创建配置文件vimpip.conf#编辑a# 在文件中写入如下内容[global]index-urlhttps://pypi.tuna.tsinghua.edu.cn/simple[install]trusted-hostmirrors.tuna.tsinghua.edu.cn esc#退出编辑:wq#保存退出catpip.conf#查看编辑的内容从而得到如下结果安装一个包看看pipinstalltoad可以使用清华源了
📌 标签:
工业官网
设计趋势
AI 建站
SEO
获取完整报告 →
RELATED ARTICLES
推荐阅读
2026/9/29 7:38:05
干货分享 | TSMaster 信号映射的配置方法
2026/9/29 7:33:05
SAP销售应收与成本科目确定:VKOA与OBYC配置排错
2026/9/29 7:33:05
基于Dify构建AI复盘系统:RAG与工作流驱动的经验沉淀方案
2026/9/29 8:18:07
从对话历史到长期记忆:用Dify构建AI“后见之明”复盘工作流
2026/9/29 8:18:07
电商购物车与支付模块功能测试实战:用XMind解构业务契约
2026/9/29 8:18:07
TensorFlow本质:张量计算图与生产级AI部署
2026/9/29 8:18:07
marshmallow 内部错误存储机制解析:ErrorStore 与 merge_errors 的实现原理
2026/9/29 8:18:07
谷歌 Gemini 3 + Nano Banana Pro 双杀背后:用 TaoToken 统一 Key 打通多模型配置实战
2026/9/29 8:13:07
allegro大十字光标设置方法:TaoToken统一Key接入Cline的config.toml骨架
2026/9/29 0:02:32
开源模型端侧落地实战:量化、推理加速与Agent上下文管理
2026/9/29 0:02:32
AI Evals实战指南:从零搭建LLM应用评估体系与CI/CD集成
2026/9/29 0:02:32
Java采购管理系统实战:从数据库设计到事务一致性
2026/9/28 2:37:38
网站建设的英语怎么说?别只背单词,看完这套安全完整流程才敢上线
2026/9/28 5:00:42
新手入门看这篇:建设网站加盟避坑指南与SEO实操
2026/9/28 8:17:28
论文AIGC疑似度是什么意思?想查论文AI率有哪些免费工具?