Python pip installation on Mac is not working

前端 未结 4 1060
别跟我提以往
别跟我提以往 2021-01-26 06:05

I have a Macbook Air and want to install pip. I have the updated python version. I follow all the instructions but I cannot install any packages.

I have been researching

相关标签:
4条回答
  • 2021-01-26 06:27

    Try below

    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    python3 get-pip.py
    
    0 讨论(0)
  • 2021-01-26 06:33

    Install it form here: https://www.python.org/downloads and check "Add to PATH".. . It comes with pip installed

    0 讨论(0)
  • 2021-01-26 06:40

    Look at the final warning, which says that these scripts are not in PATH. Open Finder, and copy the listed files into the following directory: /usr/local/bin/

    Go to /Users/arnau/Library/Python/2.7/bin. Duplicate the files listed into /usr/local/bin/ so that the command-line can recognize your command, pip.

    If you don’t want to do this (which I don’t suggest), you can simply use the other answers for now which say to use python -m pip, which directs the command-line to the current directory of these files, /Users/arnau/Library/Python/2.7/bin. You may, however run into problems in the future doing this, so I suggested my above answer.

    I also expect that you won’t want to type an additional 2 keywords every time you have to install a package.

    0 讨论(0)
  • 2021-01-26 06:41

    Try this

    sudo easy_install pip  
    

    Then

    pip install beautifulsoup4
    

    If it doesn't work try this:

    python -m pip install beautifulsoup4
    
    0 讨论(0)
提交回复
热议问题