我用以下方法升级了pip:
> pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [Errno 39] Directory not empty: 'commands'
现在它正在使用/usr
的系统点
如何在我的conda环境中找回pip? (也许没有重新安装env)
我在激活环境后尝试过
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
但那只是给出了同样的错误
对于python2
sudo python -m pip uninstall pip && sudo apt install python-pip --reinstall
对于python3
sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall