运行时出现此错误
$ 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.
我已经经历过这个githubissue,但还不清楚解决方案。
试试这个
sudo apt get remove python pip python dev-这将删除pip和python 然后安装所需版本的python和pip
试试这个
建议在Ubuntu 18.04上通过PyPA guide安装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
,以防找不到路径。相关问题 更多 >
编程相关推荐