在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:/

本文记录了在Ubuntu18.04上安装pip3遇到的问题及解决办法。由于默认源可能导致安装失败,作者选择了更换为阿里云源,通过备份源文件、替换源文件内容并更新源,最终成功安装pip3。
最低0.47元/天 解锁文章
1935

被折叠的 条评论
为什么被折叠?



