xubuntu下安装 python-pip3

目前最新的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'.
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容