回到顶部

CONTENTS

python3 不小心 卸载了 pip,重装 pip 办法

卸载日志

手残了,多打了 pip,而且还没看提示,一路 Y

(joyoo) yinzhuoqundeMacBook-Pro:joyoo yinzhuoqun$ pip uninstall pip install django-celery-results
Uninstalling pip-19.3.1:
  Would remove:
    /Users/yinzhuoqun/.pyenv/joyoo/bin/pip
    /Users/yinzhuoqun/.pyenv/joyoo/bin/pip3
    /Users/yinzhuoqun/.pyenv/joyoo/bin/pip3.6
    /Users/yinzhuoqun/.pyenv/joyoo/lib/python3.6/site-packages/pip-19.3.1.dist-info/*
    /Users/yinzhuoqun/.pyenv/joyoo/lib/python3.6/site-packages/pip/*
Proceed (y/n)? y
  Successfully uninstalled pip-19.3.1
WARNING: Skipping install as it is not installed.
Uninstalling django-celery-results-1.1.2:
  Would remove:
    /Users/yinzhuoqun/.pyenv/joyoo/lib/python3.6/site-packages/django_celery_results-1.1.2.dist-info/*
    /Users/yinzhuoqun/.pyenv/joyoo/lib/python3.6/site-packages/django_celery_results/*
Proceed (y/n)? 
Your response ('') was not one of the expected responses: y, n
Proceed (y/n)? y
  Successfully uninstalled django-celery-results-1.1.2
(joyoo) yinzhuoqundeMacBook-Pro:joyoo yinzhuoqun$ pip uninstall django-celery-results
-bash: /Users/yinzhuoqun/.pyenv/joyoo/bin/pip: No such file or directory
(joyoo) yinzhuoqundeMacBook-Pro:joyoo yinzhuoqun$ pip
-bash: /Users/yinzhuoqun/.pyenv/joyoo/bin/pip: No such file or directory

重装 pip

Mac: cd 到 该 python 环境的 bin 目录(/Users/yinzhuoqun/.pyenv/joyoo/bin)

Windows:cd 到 该 python 环境的 Scripts 目录

执行重装命令

./easy_install pip

yinzhuoqundeMacBook-Pro:bin yinzhuoqun$ ./easy_install pip
Searching for pip
Reading https://pypi.org/simple/pip/
Downloading https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl#sha256=6917c65fc3769ecdc61405d3dfd97afdedd75808d200b2838d7d961cebc0c2c7
Best match: pip 19.3.1
Processing pip-19.3.1-py2.py3-none-any.whl
Installing pip-19.3.1-py2.py3-none-any.whl to /Users/yinzhuoqun/.pyenv/joyoo/lib/python3.6/site-packages
Adding pip 19.3.1 to easy-install.pth file
Installing pip script to /Users/yinzhuoqun/.pyenv/joyoo/bin
Installing pip3 script to /Users/yinzhuoqun/.pyenv/joyoo/bin
Installing pip3.7 script to /Users/yinzhuoqun/.pyenv/joyoo/bin

Installed /Users/yinzhuoqun/.pyenv/joyoo/lib/python3.6/site-packages/pip-19.3.1-py3.6.egg
Processing dependencies for pip
Finished processing dependencies for pip

 


^_^
请喝咖啡 ×

前一篇: Django + djcelery + redis 执行异步任务
下一篇: Django + celery + redis 执行异步任务及查看结果(推荐)
captcha
带 * 是必填项