美文网首页
mac下安装pip

mac下安装pip

作者: 一剑卿心 | 来源:发表于2019-07-31 13:28 被阅读0次
    1. mac下使用sudo easy_install pip会报错。
    2. 所以直接下载pip压缩包并解压。下载压缩包:pip-19.2.1.tar.gz
    3. 打开终端,从终端进入pip解压后的目录。
    4. 然后执行sudo python setup.py install安装pip.
      pip官网

    注意:

    • python setup.py install 前要加sudo,不然会报权限错误。


      image.png

    The following error occurred while trying to add or remove files in the
    installation directory:

    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-8868.pth'

    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:

    /Library/Python/2.7/site-packages/

    Perhaps your account does not have write access to this directory? If the
    installation directory is a system-owned directory, you may need to sign in
    as the administrator or "root" account. If you do not have administrative
    access to this machine, you may wish to choose a different installation
    directory, preferably one that is listed in your PYTHONPATH environment
    variable.

    相关文章

      网友评论

          本文标题:mac下安装pip

          本文链接:https://www.haomeiwen.com/subject/gjwzrctx.html