在ubuntu上使用sudo apt install python3-pip
安装pip,一直没有成功,查看了好多日志,原因可能是没有更换国内的源,将系统更换为阿里的源之后,运行命令后安装成功。
在这里记录一下Ubuntu:apt-get命令
-h, --help //查看帮助文档
-v, --version //查看apt-get的版本
-y, //在需要确认的场景中回应yes
-s, --dry-run //模拟执行并输出结果
-d, --download-only //把包下载到缓存中而不安装
--only-upgrade //在执行install命令时,不安装已安装包的更新
-q, --quite //减少输出
--purge // 配合remove命令删除包的配置文件
--reinstall //重新安装已安装的包或其新版本
ubuntu更新源
- 备份原来的源文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
- 替换源
阿里的源文件deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http:/