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环境配置
在学习开发过程中,每当遇到新的问题时,通常都能在网上搜到解决的方法,但是网上的方法千千万,有些是已经过时了的,有些是跟自己开发环境不同的,总是不能第一时间能找到答案. 而当时遇到的问题可能在今后的开发 ...
随机推荐
- linux 允许mysql用户远程访问
搭建服务器..怎么导入数据库? 直接来个用户吧 数据库名字(已存在): table 创建mysql新用户,并指定数据库,允许远程访问 mysql用户: test mysql用户密码: test666 ...
- shell脚本抓取网页信息
利用shell脚本分析网站数据 # define url time=$(date +%F) mtime=$(date +%T) file=/abc/shell/abc/abc_$time.log ht ...
- Think PHP递归重新排序无限极子分类数组(递归无限极分类)
Think PHP递归重新排序无限极子分类数组 // 递归重新排序无限极子分类数组 function recursive($array,$pid=0,$level=0){ $arr = array() ...
- 报警告session_regenerate_id(): Failed to create(read) session ID: files (path: N;/path)
php.ini文件中的session.save_path = "N;/path"注释掉(前面加分号)
- mysql数据库多源复制方案
概述 由于目前生产环境的mysql数据库分布在两台服务器,若从单一主从来看,配置很简单,但是需要将两台服务器的数据库同步到一台从库上面,需要进行更多配置和注意事项.多源复制有两种方案,Binlog+P ...
- EF和PetaPoco实现快速开发
PetaPoco是一款适用于.NET应用程序的轻型对象关系映射器(ORM, Object Relational Mapper).与那些功能完备的ORM(如NHibernate或Entity Frame ...
- Kafka Consumer接口
对于kafka的consumer接口,提供两种版本, high-level 一种high-level版本,比较简单不用关心offset, 会自动的读zookeeper中该Consumer grou ...
- Python开发【模块】:time、datatime
时间模块 时间相关的操作,时间有三种表示方式: 时间戳 1970年1月1日之后的秒,即:time.time() 格式化的字符串 2014-11-11 11:11, ...
- 如何修改git分支名名称
1. 修改本地git分支名称指令 git branch -m oldBranchName newBranchName 2. 修改远程仓库(github)上的分支名称 git本地分支名已修改,只需推送到 ...
- C++ Design Pattern: What is a Design Pattern?
Q: What is a Design Pattern? A: Design Patterns represent solutions to problems what arise when deve ...