ubuntu系统安装python3的编程环境_Ubuntu 16.04上安装Python 3以及设置本地编程环境

1.更新Ubuntu软件下载地址

http://wiki.ubuntu.org.cn/源列表

2.备份Ubuntu默认的源地址

lin@ubuntu:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

3.更新服务器列表

lin@ubuntu:~$ sudo gedit /etc/apt/sources.list 将1中复制的内容粘贴到此文件中

4.Ubuntu 16.04预装了Python 3和Python 2。 为确保是最新版本,用apt-get更新和升级系统:

lin@ubuntu:~$ sudo apt-get update

lin@ubuntu:~$ sudo apt-get -y upgrade

-y标志将确认用户同意安装所有项目,但根据Linux版本,用户也可能需要确认系统更新和升级的其他提示。

5.安装pip以管理Python的软件包:

lin@ubuntu:~$ sudo apt-get install -y python3-pip

pip3的使用方法 pip3 install package_name

虚拟环境

1.安装virtualenvwrapper

lin@ubuntu:~$ sudo apt-get install python-virtualenv

lin@ubuntu:~$ pip3 install virtualenvwrapper 或者 sudo easy_install virtualenvwrapper (使用easy_install需要先安装sudo apt-get install python-setuptools python-dev build-essential)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值