推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
c4f36e5766583218
V2EX  ›  Python

Python 卸载模块 without pip

  •  
  •   c4f36e5766583218 · Apr 18, 2019 · 2689 views
    This topic created in 2723 days ago, the information mentioned may be changed or developed.

    Ubuntu 16.04.1 LTS,自带了 python3.5.2 还有个 pip3 指向 python3.5.2 的。

    但是太低,程序不支持,所以安装了

    • python3.7
    sudo add-apt-repository ppa:deadsnakes/ppa
    

    然后这个 pip 把 pip3 覆盖了,现在状态是 pip,pip3 都指向 python3.7

    问:现在 python3.5 要如何卸载模块?

    python3.5 -m pip -V
    #/usr/bin/python3.5: No module named pip
    
    8 replies  •  2019-04-19 21:22:21 +08:00
    chaleaochexist
        1
    chaleaochexist  
       Apr 18, 2019
    我们一般都用 virtualenv pipenv 管理环境.
    chaleaochexist
        2
    chaleaochexist  
       Apr 18, 2019
    针对你的问题.
    我们可以直接删除 python3.5/sitepackage 下面的文件夹就可以了.
    路径是虚拟的,我也不是很清楚 ubuntu 上面的具体路径.
    Trim21
        3
    Trim21  
       Apr 18, 2019 via Android
    你可以用 Python3.5 运行一下 get-pip.py 先安一个 pip 上去…
    c4f36e5766583218
        4
    c4f36e5766583218  
    OP
       Apr 18, 2019
    @Trim21 你的头像加上你的评论,我觉得应该在末尾补上个🌺🐔才符合身份
    julyclyde
        5
    julyclyde  
       Apr 19, 2019
    先-m ensurepip 把 pip 给 ensure 一下
    c4f36e5766583218
        6
    c4f36e5766583218  
    OP
       Apr 19, 2019
    @julyclyde #5 正确命令是?
    c4f36e5766583218
        8
    c4f36e5766583218  
    OP
       Apr 19, 2019
    /usr/bin/python3.5: No module named ensurepip
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2296 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 06:20 · PVG 14:20 · LAX 23:20 · JFK 02:20
    ♥ Do have faith in what you're doing.