[英]How to update pip3 to its latest version in Ubuntu 18.04?
運行時出現此錯誤
$ pip3 install -U pip
Requirement already up-to-date: pip in ./dlenv/lib/python3.6/site-packages (10.0.1)
launchpadlib 1.10.6 requires testresources, which is not installed.
我已經在apt中搜索過,並且testresources
似乎已經安裝了。
apt search testresources
Sorting... Done
Full Text Search... Done
python-testresources/bionic,bionic 2.0.0-2 all
PyUnit extension for managing expensive test fixtures - Python 2.x
python3-testresources/bionic,bionic 2.0.0-2 all
PyUnit extension for managing expensive test fixtures - Python 3.
我已經解決了這個github 問題 ,但解決方案還不清楚。
嘗試這個,
sudo apt install python3-testresources
建議根據Ubuntu 18.04上的PyPA指南安裝pip,因為如果我們通過sudo apt install python3-pip
安裝pip版本太舊,則pip版本太舊。
為我工作:
# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
# python get-pip.py
順便說一句,pip的默認位置是/usr/local/bin/pip
,以防找不到PATH。
嘗試這個
sudo apt-get remove python-pip python-dev-這將刪除pip和python,然后安裝所需版本的python和pip
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.