python 安装虚拟环境virtualenv

1.sudo apt install virtualenv

 安装失败

2.sudo apt-get update

 更新失败 提示:

E: 仓库 “http://mirrors.aliyun.com/ubuntu artful Release” 不再含有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://mirrors.aliyun.com/ubuntu artful-updates Release” 不再含有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://mirrors.aliyun.com/ubuntu artful-backports Release” 不再含有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://mirrors.aliyun.com/ubuntu artful-security Release” 不再含有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

3.解决sudo apt-get update的问题

参考https://blog.csdn.net/github_35160620/article/details/52115542

文件留备份

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

重新编写文件  /etc/apt/sources.list 文件 里面存放的是 Linux系统需要的软件源的网站。

sudo gedit /etc/apt/sources.list
将下面代码写到文件中
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
4.再sudo apt-get update
5.再sudo apt install virtualenv
大致应该差不多就安装成功了
-------未完待续----------
原文地址:https://www.cnblogs.com/cxl-blog/p/10928286.html