美文网首页
ubuntu18.04 无法使用pip list

ubuntu18.04 无法使用pip list

作者: 折花载酒z | 来源:发表于2019-03-24 02:10 被阅读0次
由于unbuntu18自带python3 所以使用pip3 list查看

提示安装sudo apt install python3-pip
按照提示安装----
此时提示无法获取--------------这是一个网址--------------
解决方法(ps:此时sudo apt-get update 无法正常使用):
【期间尝试过更改dns解析ttps://blog.csdn.net/xiangxianghehe/article/details/78695968](https://blog.csdn.net/xiangxianghehe/article/details/78695968)
sudo vim /etc/resolv.conf
添加【注意是添加不是直接改,不过改了也没事重启服务器会重置】
添加nameserver 8.8.8.8

sudo apt-get clean 之后重新安装【我使用此方法解决】

之后使用pip3 list警告:

DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.

pip升级到9.0.1后 查看pip.list 出现的警告 , 这个警告是提示以后pip的版本默认格式会采用columns, 你可以通过--format来指定以什么形式进行展示(legacyh 或者 columns 格式)
解决方法:

创建pip.conf的配置文件去掉警告。

cd ~    跳到根目录

mkdir .pip   创建.pip文件(.pip隐藏文件,ll可以查看)

cd .pip   进入到.pip

vi pip.conf   创建pip,conf文件并进入到vi编辑模式
在vi里输入以下内容:
[list]
format=columns

相关文章

网友评论

      本文标题:ubuntu18.04 无法使用pip list

      本文链接:https://www.haomeiwen.com/subject/jolyvqtx.html