[Python] No Module named pip when running it

Discussão em 'Python' iniciado por Stack, Abril 26, 2025.

  1. Stack

    Stack Membro Participativo

    When I use pip3 I get this error:

    Traceback (most recent call last):
    File "/Library/Developer/CommandLineTools/usr/bin/pip3", line 7, in <module>
    from pip import main
    ModuleNotFoundError: No module named 'pip'


    I tried to reinstall PIP but still reported this error, but I use python3 -m ensurepip

    It told me to install Xcode command line

    $ python3 -m ensurepip
    $ xcode-select: Failed to locate 'python3.9', requesting installation of command line developer tools.

    Continue reading...

Compartilhe esta Página