< >
Home » Ubuntu系统入门教程 » Ubuntu系统入门教程-增加python源进行加速

Ubuntu系统入门教程-增加python源进行加速

Ubuntu系统入门教程-增加python源加速python软件安装

说明:

  • 介绍如何添加python源加速python软件安装
  • 环境: ubuntu20.04

步骤:

  • python的镜像源
豆瓣 (douban) http://pypi.douban.com/simple/ (推荐)
阿里云 http://mirrors.aliyun.com/pypi/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
推荐豆瓣 douban 镜像源,以下的所有示例也都会以豆瓣镜像源为例。
  • 新建目录和文件
mkdir ~/.pip
touch ~/.pip/pip.conf 
vim ~/.pip/pip.conf 
  • pip.conf内容
[global] 
index-url = http://pypi.douban.com/simple 
[install] 
trusted-host=pypi.douban.com
  • 再测试安装python包就很快了
pip3 install django

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: ubuntu系统入门教程