美文网首页
换源-pip-ubuntu-CentOS

换源-pip-ubuntu-CentOS

作者: e6a01065dcfd | 来源:发表于2018-08-24 15:55 被阅读0次

软件仓库源

清华大学开源软件镜像站 https://mirrors.tuna.tsinghua.edu.cn/
阿里巴巴OPSX软件仓库 https://opsx.alibaba.com/mirror

pip源

阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

pip 换源

安装包时,使用-i指定源
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple mysqldb

修改默认设置

linux的文件在 ~/.pip/pip.conf
windows在 %HOMEPATH%\pip\pip.ini
没有目录需要自己创建

[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com

ubuntu 换源

备份系统源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

修改sudo vim /etc/apt/sources.list

Ubuntu 14.04.5 LTS

deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

## Not recommended
# deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

更新生效

sudo apt-get update

相关文章

  • 换源-pip-ubuntu-CentOS

    软件仓库源 清华大学开源软件镜像站 https://mirrors.tuna.tsinghua.edu.cn/阿里...

  • 解决CocoaPods慢的方案(gem和pod repo换源)

    gem换源 确保只有gems.ruby-china.org源 pod repo换源 默认是GitHub源 我们把它...

  • 换源

    换源有好几个方式我选择使用简单粗暴的YaST 首先打开YaST 先关闭所有的官方软件源尤其是其中一个叫openSU...

  • ubuntu/MacOS 换源信息整合

    ubuntu/MacOS 换源信息整合 0x01 brew换源 1、替换默认源 https://mirrors.u...

  • Ubuntu换源、安装Python3.8

    Ubuntu换源、安装Python3.8 1. ubuntu换源 下面这些是国内主要的镜像源网站。 阿里源 h...

  • Conda 换源和PiP换源

    前言 每次配置实验室的Linux GPU服务器时,都会遇见Conda换源的问题,遂在此记录之。 Conda更换为清...

  • Homebrew Node npm 等

    Homebrew Node 和 npm watchman flow npm 换源 检查换源是否成功 create-...

  • [转载] Windows conda pip 改源

    Windows下conda换源pip换源https://blog.csdn.net/weixin_44201449...

  • conda&jupyter&虚拟环境

    环境版本 win10anaconda:4.9.2(自带jupyter)python:3.8 换源 conda换源使...

  • npm换源

    国内常用的源是淘宝的npm镜像 源地址为: 临时换源: 永久换源: 原文链接:http://www.jianshu...

网友评论

      本文标题:换源-pip-ubuntu-CentOS

      本文链接:https://www.haomeiwen.com/subject/eizbiftx.html