【Bug解决】Ubuntu安装pip3:无法定位软件包问题 |
您所在的位置:网站首页 › ubuntu无法定位软件包python2-pip › 【Bug解决】Ubuntu安装pip3:无法定位软件包问题 |
问题情景 在虚拟机上,我安装了Ubuntu18.04版本,系统默认自带了python3.6.5,然而没安装pip工具。 使用下面的语句进行安装 代码语言:javascript复制sudo apt install python3-pip结果报错:无法定位软件包问题 问题原因和解决这是因为之前我对apt进行了换源,更换了清华源,然而,目前这个源似乎在Ubuntu18.04无法使用,于是换成阿里源 使用gedit打开源文件 代码语言:javascript复制sudo gedit /etc/apt/sources.list将文件里面的内容全部替换为 代码语言:javascript复制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然后更新软件包 代码语言:javascript复制sudo apt-get update现在再次输入安装命令,即可成功安装。 另附pip换源和Anaconda的安装,可参考这篇文章 https://blog.csdn.net/weixin_46116553/article/details/109154320 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |