[Python] How to remove packages installed with older versions of Python/Pip?

Discussão em 'Python' iniciado por Stack, Maio 3, 2025.

  1. Stack

    Stack Membro Participativo

    I'm experiencing a issue with my packages, I installed a package with Python 3.7 and the current version of Python in my computer is 3.9. So I can't uninstall or update the given package.

    ζ pip3 install --upgrade youtube-dl
    Requirement already satisfied: youtube-dl in /usr/local/lib/python3.9/site-packages (2021.4.7)
    Collecting youtube-dl
    Downloading youtube_dl-2021.4.26-py2.py3-none-any.whl (1.9 MB)
    |████████████████████████████████| 1.9 MB 551 kB/s
    Installing collected packages: youtube-dl
    Attempting uninstall: youtube-dl
    Found existing installation: youtube-dl 2021.4.7
    Uninstalling youtube-dl-2021.4.7:
    Successfully uninstalled youtube-dl-2021.4.7
    Successfully installed youtube-dl-2021.4.26
    WARNING: You are using pip version 21.0.1; however, version 21.1.1 is available.
    You should consider upgrading via the '/usr/local/opt/python@3.9/bin/python3.9 -m pip install --upgrade pip' command.

    ζ youtube-dl --version
    2021.04.01

    ζ which pip3
    /usr/local/opt/python@3.9/bin/pip3

    ζ which youtube-dl
    /Library/Frameworks/Python.framework/Versions/3.7/bin/youtube-dl


    How can

    Continue reading...

Compartilhe esta Página