简体   繁体   English

Conda:点升级损坏的点,如何在环境中恢复点

[英]Conda: Pip upgrade corrupted pip, how to get back pip in the env

I upgraded pip using: 我使用以下方式升级了点子:

> 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'

Now it is using the system's pip from /usr 现在它正在使用/usr的系统pip

How do I get back pip in my conda environment? 如何在conda环境中获得点子? (perhaps without reinstalling the env) (也许无需重新安装环境)

I tried after activating the environment 我在激活环境后尝试过

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py

but that just gave the same error 但这给了同样的错误

for python2 对于python2

    sudo python -m pip uninstall pip && sudo apt install python-pip --reinstall

for python3 对于python3

    sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM