python – 尝试在Mac OS X Lion中安装点时权限被拒绝

我试图在Mac(OS X Lion)上安装点数.它似乎不起作用我使用sudo并提示输入密码.

$sudo curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 85929  100 85929    0     0  63833      0  0:00:01  0:00:01 --:--:-- 99339
Downloading/unpacking pip
  Downloading pip-1.2.tar.gz (94Kb): 94Kb downloaded
  Running setup.py egg_info for package pip

    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
    no previously-included directories found matching 'docs/_build/_sources'
Installing collected packages: pip
  Running setup.py install for pip
    error: could not create '/Library/Python/2.7/site-packages/pip': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/Users/kristoffernolgren/build/pip/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/pip-snSujv-record/install-record.txt:
    running install

running build

running build_py

creating build

creating build/lib

creating build/lib/pip

copying pip/__init__.py -> build/lib/pip

copying pip/__main__.py -> build/lib/pip

copying pip/backwardcompat.py -> build/lib/pip

copying pip/basecommand.py -> build/lib/pip

copying pip/baseparser.py -> build/lib/pip

copying pip/download.py -> build/lib/pip

copying pip/exceptions.py -> build/lib/pip

copying pip/index.py -> build/lib/pip

copying pip/locations.py -> build/lib/pip

copying pip/log.py -> build/lib/pip

copying pip/req.py -> build/lib/pip

copying pip/runner.py -> build/lib/pip

copying pip/status_codes.py -> build/lib/pip

copying pip/util.py -> build/lib/pip

creating build/lib/pip/commands

copying pip/commands/__init__.py -> build/lib/pip/commands

copying pip/commands/bundle.py -> build/lib/pip/commands

copying pip/commands/completion.py -> build/lib/pip/commands

copying pip/commands/freeze.py -> build/lib/pip/commands

copying pip/commands/help.py -> build/lib/pip/commands

copying pip/commands/install.py -> build/lib/pip/commands

copying pip/commands/search.py -> build/lib/pip/commands

copying pip/commands/uninstall.py -> build/lib/pip/commands

copying pip/commands/unzip.py -> build/lib/pip/commands

copying pip/commands/zip.py -> build/lib/pip/commands

creating build/lib/pip/vcs

copying pip/vcs/__init__.py -> build/lib/pip/vcs

copying pip/vcs/bazaar.py -> build/lib/pip/vcs

copying pip/vcs/git.py -> build/lib/pip/vcs

copying pip/vcs/mercurial.py -> build/lib/pip/vcs

copying pip/vcs/subversion.py -> build/lib/pip/vcs

running install_lib

creating /Library/Python/2.7/site-packages/pip

error: could not create '/Library/Python/2.7/site-packages/pip': Permission denied

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/Users/kristoffernolgren/build/pip/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/pip-snSujv-record/install-record.txt failed with error code 1
Storing complete log in /Users/kristoffernolgren/.pip/pip.log

底部提到的错误日志.

------------------------------------------------------------
 run on Wed Sep  5 10:42:27 2012
Downloading/unpacking pip
  Getting page http://pypi.python.org/simple/pip
  URLs to search for versions for pip:
  * http://pypi.python.org/simple/pip/
  Getting page http://www.pip-installer.org
  Getting page http://pip.openplans.org
  Analyzing links from page http://pypi.python.org/simple/pip/
    Found link http://pypi.python.org/packages/source/p/pip/pip-1.0.1.tar.gz#md5=28dcc70225e5bf925532abc5b087a94b (from http://pypi.python.org/simple/pip/), version: 1.0.1
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.6.tar.gz#md5=083ff408ca5314cf0561ff79a048cd9a (from http://pypi.python.org/simple/pip/), version: 0.6
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.8.tar.gz#md5=468d9adc309f33ad51cee38f0d455429 (from http://pypi.python.org/simple/pip/), version: 0.8
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.8.1.tar.gz#md5=5d40614774781b118dd3f10c0d038cbc (from http://pypi.python.org/simple/pip/), version: 0.8.1
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.5.tar.gz#md5=63eed8673e40628534cc0aa9c98e8f3d (from http://pypi.python.org/simple/pip/), version: 0.5
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.2.tar.gz#md5=9eda07c8be7105aa774c7eb51c023294 (from http://pypi.python.org/simple/pip/), version: 0.2
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.2.1.tar.gz#md5=d2af655c1a87e03799442d045c1d6743 (from http://pypi.python.org/simple/pip/), version: 0.2.1
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.7.tar.gz#md5=8d4b4f7266fe0808569182e6832d74ac (from http://pypi.python.org/simple/pip/), version: 0.7
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.8.2.tar.gz#md5=df1eca0abe7643d92b5222240bed15f6 (from http://pypi.python.org/simple/pip/), version: 0.8.2
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.7.1.tar.gz#md5=420c83ad67bdcb542f772eb64392cce6 (from http://pypi.python.org/simple/pip/), version: 0.7.1
    Found link http://pypi.python.org/packages/source/p/pip/pip-1.2.tar.gz#md5=99e44d1d7f88b182459e7c19c45aee9f (from http://pypi.python.org/simple/pip/), version: 1.2
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.6.2.tar.gz#md5=9a43e0a2ce8833069f41c347932bdb25 (from http://pypi.python.org/simple/pip/), version: 0.6.2
    Found link http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz#md5=62a9f08dd5dc69d76734568a6c040508 (from http://pypi.python.org/simple/pip/), version: 1.1
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.5.1.tar.gz#md5=d4bdaa5f5f5bf8c6263ace75a0882232 (from http://pypi.python.org/simple/pip/), version: 0.5.1
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.8.3.tar.gz#md5=0603337a81f83df2b1d2f1151565efac (from http://pypi.python.org/simple/pip/), version: 0.8.3
    Found link http://pypi.python.org/packages/source/p/pip/pip-1.0.2.tar.gz#md5=47ec6ff3f6d962696fe08d4c8264ad49 (from http://pypi.python.org/simple/pip/), version: 1.0.2
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.7.2.tar.gz#md5=cfe73090aaa0d3b0c104179a627859d1 (from http://pypi.python.org/simple/pip/), version: 0.7.2
    Found link http://pypi.python.org/packages/source/p/pip/pip-1.0.tar.gz#md5=327fc4a03df189506966e15021730550 (from http://pypi.python.org/simple/pip/), version: 1.0
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.3.1.tar.gz#md5=78102ddbb040a183dd361b5d432cdf88 (from http://pypi.python.org/simple/pip/), version: 0.3.1
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.3.tar.gz#md5=8fccb5b49c6377cbfb1949ccd7be43b3 (from http://pypi.python.org/simple/pip/), version: 0.3
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.4.tar.gz#md5=b45714d04f8fd38fe8e3d4c7600b91a2 (from http://pypi.python.org/simple/pip/), version: 0.4
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.6.3.tar.gz#md5=0602fa9179cfaa98e41565d4a581d98c (from http://pypi.python.org/simple/pip/), version: 0.6.3
    Found link http://pypi.python.org/packages/source/p/pip/pip-0.6.1.tar.gz#md5=7560e3055c66afb99ac4a7892389a237 (from http://pypi.python.org/simple/pip/), version: 0.6.1
    Skipping link http://www.pip-installer.org (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://pip.openplans.org (from http://pypi.python.org/simple/pip/); not a file
    Skipping link https://github.com/pypa/pip/issues/ (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://bitbucket.org/ianb/pip/issues/ (from http://pypi.python.org/simple/pip/); not a file
    Skipping link https://raw.github.com/pypa/pip/master/contrib/get-pip.py (from http://pypi.python.org/simple/pip/); unknown archive format: .py
    Skipping link http://www.python.org/dev/peps/pep-0381/ (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://oss.openplans.org/pip/ (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://www.virtualenv.org (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://www.doughellmann.com/projects/virtualenvwrapper/ (from http://pypi.python.org/simple/pip/); not a file
    Skipping link file:// (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://www.pip-installer.org/ (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://ionelmc.wordpress.com/ (from http://pypi.python.org/simple/pip/); not a file
    Skipping link https://github.com/pypa/pip (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://travis-ci.org/pypa/pip (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://groups.google.com/group/python-virtualenv?hl=en (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://pip.openplans.org/requirement-format.html (from http://pypi.python.org/simple/pip/); unknown archive format: .html
    Skipping link https://github.com/pypa/pip/raw/master/contrib/get-pip.py (from http://pypi.python.org/simple/pip/); unknown archive format: .py
    Skipping link http://pypi.python.org/mirrors (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://trac.openplans.org/poacheggs/ (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://virtualenv.openplans.org (from http://pypi.python.org/simple/pip/); not a file
    Skipping link http://peak.telecommunity.com/DevCenter/EasyInstall (from http://pypi.python.org/simple/pip/); not a file
    Found link https://github.com/pypa/pip/tarball/develop#egg=pip-dev (from http://pypi.python.org/simple/pip/), version: dev
  Analyzing links from page http://www.pip-installer.org/en/latest/index.html
    Skipping link http://www.pip-installer.org/en/latest/_static/nature.css (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .css
    Skipping link http://www.pip-installer.org/en/latest/_static/pygments.css (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .css
    Skipping link http://www.pip-installer.org/en/latest/index.html (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/installing.html (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/index.html#pip (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://pypi.python.org/pypi (from http://www.pip-installer.org/en/latest/index.html); not a file
    Skipping link http://www.pip-installer.org/en/latest/installing.html#prerequisites (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/installing.html#using-the-installer (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/installing.html#alternative-installation-procedures (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/usage.html (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/usage.html#install-packages (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/usage.html#uninstall-packages (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/usage.html#searching-for-packages (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/usage.html#bundles (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/requirements.html (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/requirements.html#freezing-requirements (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/requirements.html#the-requirements-file-format (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/configuration.html (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/configuration.html#examples (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/configuration.html#config-files (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/configuration.html#environment-variables (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/configuration.html#configuration-options (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/other-tools.html (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/other-tools.html#pip-compared-to-easy-install (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/other-tools.html#using-pip-with-virtualenv (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/other-tools.html#using-pip-with-buildout (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/other-tools.html#using-pip-with-the-user-scheme (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/other-tools.html#command-line-completion (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/contributing.html (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/contributing.html#release-schedule (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/contributing.html#contributing-with-code (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/contributing.html#running-the-tests (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/contributing.html#contributing-with-tests (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/contributing.html#contributing-with-bug-reports (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/contributing.html#contributing-with-ideas (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/news.html (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/news.html#changelog (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/glossary.html (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://www.pip-installer.org/en/latest/index.html#community (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .html
    Skipping link http://sphinx.pocoo.org/ (from http://www.pip-installer.org/en/latest/index.html); not a file
    Skipping link http://readthedocs.org/projects/pip/?fromdocs=pip (from http://www.pip-installer.org/en/latest/index.html); not a file
    Skipping link http://readthedocs.org/docs/pip/en/latest/ (from http://www.pip-installer.org/en/latest/index.html); not a file
    Skipping link http://readthedocs.org/docs/pip/en/1.0.1/ (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .1
    Skipping link http://readthedocs.org/docs/pip/en/1.0/ (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .0
    Skipping link http://readthedocs.org/docs/pip/en/0.8.3/ (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .3
    Skipping link http://readthedocs.org/docs/pip/en/0.7.2/ (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .2
    Skipping link http://readthedocs.org/docs/pip/en/0.6.1/ (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .1
    Skipping link http://readthedocs.org/docs/pip/en/0.5/ (from http://www.pip-installer.org/en/latest/index.html); unknown archive format: .5
  Analyzing links from page http://www.pip-installer.org/en/latest/
    Skipping link http://www.pip-installer.org/en/latest/ (from http://www.pip-installer.org/en/latest/); not a file
    Skipping link http://www.pip-installer.org/en/latest/#pip (from http://www.pip-installer.org/en/latest/); not a file
    Skipping link http://www.pip-installer.org/en/latest/#community (from http://www.pip-installer.org/en/latest/); not a file
  Using version 1.2 (newest of versions: 1.2, 1.1, 1.0.2, 1.0.1, 1.0, 0.8.3, 0.8.2, 0.8.1, 0.8, 0.7.2, 0.7.1, 0.7, 0.6.3, 0.6.2, 0.6.1, 0.6, 0.5.1, 0.5, 0.4, 0.3.1, 0.3, 0.2.1, 0.2, dev)
  Downloading from URL http://pypi.python.org/packages/source/p/pip/pip-1.2.tar.gz#md5=99e44d1d7f88b182459e7c19c45aee9f (from http://pypi.python.org/simple/pip/)
  Running setup.py egg_info for package pip
    running egg_info
    creating pip-egg-info/pip.egg-info
    writing pip-egg-info/pip.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/pip.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/pip.egg-info/dependency_links.txt
    writing entry points to pip-egg-info/pip.egg-info/entry_points.txt
    writing manifest file 'pip-egg-info/pip.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info/pip.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.html' under directory 'docs'
    warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
    no previously-included directories found matching 'docs/_build/_sources'
    writing manifest file 'pip-egg-info/pip.egg-info/SOURCES.txt'
Installing collected packages: pip
  Running setup.py install for pip
    Running command /usr/bin/python -c "import setuptools;__file__='/Users/kristoffernolgren/build/pip/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/pip-snSujv-record/install-record.txt
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/pip
    copying pip/__init__.py -> build/lib/pip
    copying pip/__main__.py -> build/lib/pip
    copying pip/backwardcompat.py -> build/lib/pip
    copying pip/basecommand.py -> build/lib/pip
    copying pip/baseparser.py -> build/lib/pip
    copying pip/download.py -> build/lib/pip
    copying pip/exceptions.py -> build/lib/pip
    copying pip/index.py -> build/lib/pip
    copying pip/locations.py -> build/lib/pip
    copying pip/log.py -> build/lib/pip
    copying pip/req.py -> build/lib/pip
    copying pip/runner.py -> build/lib/pip
    copying pip/status_codes.py -> build/lib/pip
    copying pip/util.py -> build/lib/pip
    creating build/lib/pip/commands
    copying pip/commands/__init__.py -> build/lib/pip/commands
    copying pip/commands/bundle.py -> build/lib/pip/commands
    copying pip/commands/completion.py -> build/lib/pip/commands
    copying pip/commands/freeze.py -> build/lib/pip/commands
    copying pip/commands/help.py -> build/lib/pip/commands
    copying pip/commands/install.py -> build/lib/pip/commands
    copying pip/commands/search.py -> build/lib/pip/commands
    copying pip/commands/uninstall.py -> build/lib/pip/commands
    copying pip/commands/unzip.py -> build/lib/pip/commands
    copying pip/commands/zip.py -> build/lib/pip/commands
    creating build/lib/pip/vcs
    copying pip/vcs/__init__.py -> build/lib/pip/vcs
    copying pip/vcs/bazaar.py -> build/lib/pip/vcs
    copying pip/vcs/git.py -> build/lib/pip/vcs
    copying pip/vcs/mercurial.py -> build/lib/pip/vcs
    copying pip/vcs/subversion.py -> build/lib/pip/vcs
    running install_lib
    creating /Library/Python/2.7/site-packages/pip
    error: could not create '/Library/Python/2.7/site-packages/pip': Permission denied
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/Users/kristoffernolgren/build/pip/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/pip-snSujv-record/install-record.txt:
    running install

running build

running build_py

creating build

creating build/lib

creating build/lib/pip

copying pip/__init__.py -> build/lib/pip

copying pip/__main__.py -> build/lib/pip

copying pip/backwardcompat.py -> build/lib/pip

copying pip/basecommand.py -> build/lib/pip

copying pip/baseparser.py -> build/lib/pip

copying pip/download.py -> build/lib/pip

copying pip/exceptions.py -> build/lib/pip

copying pip/index.py -> build/lib/pip

copying pip/locations.py -> build/lib/pip

copying pip/log.py -> build/lib/pip

copying pip/req.py -> build/lib/pip

copying pip/runner.py -> build/lib/pip

copying pip/status_codes.py -> build/lib/pip

copying pip/util.py -> build/lib/pip

creating build/lib/pip/commands

copying pip/commands/__init__.py -> build/lib/pip/commands

copying pip/commands/bundle.py -> build/lib/pip/commands

copying pip/commands/completion.py -> build/lib/pip/commands

copying pip/commands/freeze.py -> build/lib/pip/commands

copying pip/commands/help.py -> build/lib/pip/commands

copying pip/commands/install.py -> build/lib/pip/commands

copying pip/commands/search.py -> build/lib/pip/commands

copying pip/commands/uninstall.py -> build/lib/pip/commands

copying pip/commands/unzip.py -> build/lib/pip/commands

copying pip/commands/zip.py -> build/lib/pip/commands

creating build/lib/pip/vcs

copying pip/vcs/__init__.py -> build/lib/pip/vcs

copying pip/vcs/bazaar.py -> build/lib/pip/vcs

copying pip/vcs/git.py -> build/lib/pip/vcs

copying pip/vcs/mercurial.py -> build/lib/pip/vcs

copying pip/vcs/subversion.py -> build/lib/pip/vcs

running install_lib

creating /Library/Python/2.7/site-packages/pip

error: could not create '/Library/Python/2.7/site-packages/pip': Permission denied

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/Users/kristoffernolgren/build/pip/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/pip-snSujv-record/install-record.txt failed with error code 1
Exception information:
Traceback (most recent call last):
  File "/var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/unpacker-h4sW4t-scratchdir/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/unpacker-h4sW4t-scratchdir/pip/commands/install.py", line 228, in run
    requirement_set.install(install_options, global_options)
  File "/var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/unpacker-h4sW4t-scratchdir/pip/req.py", line 1093, in install
    requirement.install(install_options, global_options)
  File "/var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/unpacker-h4sW4t-scratchdir/pip/req.py", line 566, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/unpacker-h4sW4t-scratchdir/pip/__init__.py", line 255, in call_subprocess
    % (command_desc, proc.returncode))
InstallationError: Command /usr/bin/python -c "import setuptools;__file__='/Users/kristoffernolgren/build/pip/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/3_/tp_3vp9966dc65phynpzl04h0000gn/T/pip-snSujv-record/install-record.txt failed with error code 1
最佳答案
您正在sudo下运行curl(download)命令,但是python进程本身没有提升的权限运行.

像这样运行它:

$curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
$sudo python get-pip.py

或者,在管道的python部分使用sudo命令:

$curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python

转载注明原文:python – 尝试在Mac OS X Lion中安装点时权限被拒绝 - 代码日志