美文网首页
xubuntu下安装 python-pip3

xubuntu下安装 python-pip3

作者: 李守俊 | 来源:发表于2019-05-11 20:22 被阅读0次

目前最新的ubuntu 19.04系列发布后,在家里的姥爷机上全新安装了xubuntu。

系统默认带了python 和 python3,但是都没有安装pip,在系统内置和 Anaconda 中间稍微犹豫了一下,考虑只是偶尔用一下,内置也完全满足。


whatispip.png
  1. install pip for python3 in xubuntu 19.04
sudo apt install python3-pip
  1. 安装后默认不是最新版,升级一下
pip3 install pip -U
  1. also,默认源可能会有一些网络故障 or 网速慢的问题,建议使用国内的源
mkdir ~/.pip/
vi ~/.pip/pip.conf

添加如下内容:(注意https)

[global]
index-url = https://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com

如果觉得本文不错,请略微打赏以支持我,多谢!


增加一些报错信息,如果你遇到这些报错,可以看一下本文

#使用 国内源
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/pyyaml/

# 使用https源
WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'.

相关文章

网友评论

      本文标题:xubuntu下安装 python-pip3

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