Python pip installation on Mac is not working

前端 未结 4 1074
别跟我提以往
别跟我提以往 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: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.

提交回复
热议问题