目前最新的ubuntu 19.04系列發(fā)布后,在家里的姥爺機(jī)上全新安裝了xubuntu。
系統(tǒng)默認(rèn)帶了python 和 python3,但是都沒有安裝pip,在系統(tǒng)內(nèi)置和 Anaconda 中間稍微猶豫了一下,考慮只是偶爾用一下,內(nèi)置也完全滿足。

whatispip.png
- install pip for python3 in xubuntu 19.04
sudo apt install python3-pip
- 安裝后默認(rèn)不是最新版,升級(jí)一下
pip3 install pip -U
- also,默認(rèn)源可能會(huì)有一些網(wǎng)絡(luò)故障 or 網(wǎng)速慢的問題,建議使用國內(nèi)的源
mkdir ~/.pip/
vi ~/.pip/pip.conf
添加如下內(nèi)容:(注意https)
[global]
index-url = https://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com
如果覺得本文不錯(cuò),請(qǐng)略微打賞以支持我,多謝!
增加一些報(bào)錯(cuò)信息,如果你遇到這些報(bào)錯(cuò),可以看一下本文
#使用 國內(nèi)源
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'.