ubuntu 16.04下更换源和pip源【转】
本文转载自:https://blog.csdn.net/weixin_41500849/article/details/80246221
写在前面的话
本文主要内容是更换系统源为清华大学源,更换python的pip源为清华大学源。 使用的linux发行版为ubuntu 16.04 64位,文本编辑器为gedit,
一、更换系统源
系统源用于ubuntu中的软件更新下载。登陆用户为root(获得最高权限) 修改步骤如下:
1,备份系统源
cp /etc/apt/sources-list /etc/apt/sources-list.bak
2,打开sources-list
gedit sources-list
3,修改源
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
- deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse
4,更新下源的缓存
apt-get update
5,更新软件
apt-get upgrade
二、更改pip 源
首先需要在用户目录下创建.pip文件夹,并创建pip.conf文件,
1,进入用户目录(这时使用普通用户登陆)
cd ~
2,创建pip.conf文件
touch pip.conf
3,打开文件
gedit pip.conf
4,复制下列内容至pip.conf
- [global]
- trusted-host = pypi.mirrors.ustc.edu.cn
- index-url = https://pypi.mirrors.ustc.edu.cn/simple
ubuntu 16.04下更换源和pip源【转】的更多相关文章
- ubuntu 16.04下使用 python pip的安装问题。
ubuntu 16.04使用 pip安装软件时,不知道为什么不能使用sudo pip install XXX 需要使用的是:python -m pip install XXX才可以.
- ubuntu 16.04 下更换boost版本
如果是新机器,没装过boost,那么直接一条命令 sudo apt-get install libboost-all-dev 头文件一般安装在 /usr/include 下面有一个目录boost,里面 ...
- Ubuntu 16.04 下简单安装使用golang之备忘
刚开始学习Go语言,这里记录下我在Ubuntu 16.04下安装使用golang的过程,方便以后查询. 一.安装 1.添加源 如果使用默认的源安装golang的话,版本太低,只到1.6 ...
- Ubuntu 16.04下EasyOpenJTAG+OpenOCD的安装和使用【转】
本文转载自:http://www.linuxdiyf.com/linux/24086.html Ubuntu 16.04下EasyOpenJTAG+OpenOCD的安装和使用 发布时间:2016-09 ...
- Ubuntu 16.04下编译安装Apache2.4和PHP7结合
Ubuntu 16.04下编译安装Apache2.4和PHP7结合,并安装PDOmysql扩展. 1.编译安装apache2.4.20 1 第一步: ./configure --prefix=/usr ...
- Ubuntu 16.04 下使用Xampp
Ubuntu 16.04 下使用Xampp 什么是Xampp? XAMPP(Apache+MySQL+PHP+PERL) 是一个功能强大的建站集成软件包.这个软件包原来的名字是 LAMPP,但是为了避 ...
- Ubuntu 16.04下使用Eclipse:创建工程时卡死的解决方法
问题如下: Ubuntu 16.04下使用Eclipse创建工程时出现卡顿和卡死,新建一个MapReduce项目卡了一下午,鼠标变成了圆圈进度条转了一下午,还关不掉. 当我直接去关闭新建项目的窗口时, ...
- Ubuntu 16.04下安装MacBuntu 16.04 TP 变身Mac OS X主题风格
Ubuntu 16.04下安装MacBuntu 16.04 TP 变身Mac OS X主题风格 sudo add-apt-repository ppa:noobslab/macbuntu sudo a ...
- Ubuntu 16.04下的LAMP环境配置
在学习开发过程中,每当遇到新的问题时,通常都能在网上搜到解决的方法,但是网上的方法千千万,有些是已经过时了的,有些是跟自己开发环境不同的,总是不能第一时间能找到答案. 而当时遇到的问题可能在今后的开发 ...
随机推荐
- tomcat源码---->request的请求参数分析
当contentType为application/json的时候,在servlet中通过request.getParameter得到的数据为空.今天我们就java的请求,分析一下request得到参数 ...
- 设计模式之装饰模式(Java实现)
“怎么了,鱼哥?” “唉,别提了,网购了一件衣服,结果发现和商家描述的差太多了,有色差就算了,质量还不好,质量不好就算了,竟然大小也不行,说好的3个X,邮的却是一个X的,不说了,退货去.你先开讲吧,你 ...
- TweenLite简单运用
参考:TweenLite说明 1 ease TweenLite.to(nextLevelTip, 1.5, { x:0, ease:Bounce.easeOut } ); 2 delayCall 语法 ...
- jfinal怎么给model增加自定义的字段作为DTO?
简单的可以使用: List<Record> docList = myService.findSuperviseFile(type,id); for(Record record : docL ...
- Spring.Net的使用
1.Spring.Net的简单介绍 spring.net 框架是微软效仿java中的spring框架而推出的一种在.net中使用的框架,它使用配置的方式实现逻辑的解耦,它的主要功能集成在Spring. ...
- 解决redis远程连接不上的问题
解决redis远程连接不上的问题 redis现在的版本开启redis-server后,redis-cli只能访问到127.0.0.1,因为在配置文件中固定了ip,因此需要修改redis.conf(有的 ...
- (4.20)sql server性能指标、性能计数器
(4.20)sql server性能指标.性能计数器 常规计数器 收集操作系统服务器的服务器性能信息,包括Processor.磁盘.网络.内存 Processor 处理器 1.1 % Processo ...
- mysql 数据操作 单表查询 where 约束 目录
mysql 数据操作 单表查询 where约束 between and or mysql 数据操作 单表查询 where约束 is null in mysql 数据操作 单表查询 where约束 li ...
- EasyUI Progressbar 进度条
通过 $.fn.progressbar.defaults 重写默认的 defaults. 进度条(progressbar)提供了一种显示长时间操作进度的反馈.进度可被更新以便让用户知道当前正在执行的操 ...
- SaltStack系列(二)之常用模块
一.saltstack的内置模块汇总 acl, aliases, alternatives, apache, archive, artifactory, block ...