栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

【Bug解决】Ubuntu安装pip3:无法定位软件包问题

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【Bug解决】Ubuntu安装pip3:无法定位软件包问题

问题情景

在虚拟机上,我安装了Ubuntu18.04版本,系统默认自带了python3.6.5,然而没安装pip工具。
使用下面的语句进行安装

sudo apt install python3-pip 

结果报错:无法定位软件包问题

问题原因和解决

这是因为之前我对apt进行了换源,更换了清华源,然而,目前这个源似乎在Ubuntu18.04无法使用,于是换成阿里源
使用gedit打开源文件

sudo gedit /etc/apt/sources.list

将文件里面的内容全部替换为

deb http://mirrors.aliyun.com/ubuntu bionic main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu bionic-updates main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu bionic-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu bionic-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu bionic-backports main multiverse restricted universe

然后更新软件包

sudo apt-get update

现在再次输入安装命令,即可成功安装。

另附pip换源和Anaconda的安装,可参考这篇文章
https://blog.csdn.net/weixin_46116553/article/details/109154320

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/972421.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号