xubuntu下安裝 python-pip3

目前最新的ubuntu 19.04系列發(fā)布后,在家里的姥爺機(jī)上全新安裝了xubuntu。

系統(tǒng)默認(rèn)帶了python 和 python3,但是都沒有安裝pip,在系統(tǒng)內(nèi)置和 Anaconda 中間稍微猶豫了一下,考慮只是偶爾用一下,內(nèi)置也完全滿足。


whatispip.png
  1. install pip for python3 in xubuntu 19.04
sudo apt install python3-pip
  1. 安裝后默認(rèn)不是最新版,升級(jí)一下
pip3 install pip -U
  1. 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'.
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容