Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is incredibly, annoying, I can't do anything in python until this is fixed. Thanks if you can help, I know it can be annoying to have to look at so much code but i'd really appreciate. I'm trying to install python because I think my previous installs aren't very clean.

    familys-imac:~ Paul-Arthur$ ruby -e "$(curl -fsS https://raw.github.com/gist/323731)"
    /usr/local/.git already exists!
    familys-imac:~ Paul-Arthur$  brew install python --framework
    Warning: It appears you have MacPorts or Fink installed.
    Software installed with other package managers causes known problems for
    Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
    ==> Installing python dependency: readline
    ==> Downloading http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz
    ######################################################################## 100.0%
    ==> Downloading patches
    ######################################################################## 100.0%
    ==> Patching
    patching file vi_mode.c
    patching file callback.c
    ==> ./configure --prefix=/usr/local/Cellar/readline/6.2.1 --mandir=/usr/local/Ce
    ==> make install
    ==> Caveats
    This formula is keg-only, so it was not symlinked into /usr/local.

    OS X provides the BSD libedit library, which shadows libreadline.
    In order to prevent conflicts when programs look for libreadline we are
    defaulting this GNU Readline installation to keg-only.

    Generally there are no consequences of this for you.
    If you build your own software and it requires this formula, you'll need
    to add its lib & include paths to your build variables:

        LDFLAGS  -L/usr/local/Cellar/readline/6.2.1/lib
        CPPFLAGS -I/usr/local/Cellar/readline/6.2.1/include
    ==> Summary
    /usr/local/Cellar/readline/6.2.1: 30 files, 1.7M, built in 26 seconds
    ==> Installing python dependency: sqlite
    ==> Downloading http://www.sqlite.org/sqlite-autoconf-3070900.tar.gz
    ######################################################################## 100.0%
    ==> ./configure --prefix=/usr/local/Cellar/sqlite/3.7.9
    ==> make install
    /usr/local/Cellar/sqlite/3.7.9: 9 files, 1.9M, built in 35 seconds
    ==> Installing python dependency: gdbm
    ==> Downloading http://ftpmirror.gnu.org/gdbm/gdbm-1.9.1.tar.gz
    ######################################################################## 100.0%
    ==> ./configure --prefix=/usr/local/Cellar/gdbm/1.9.1 --mandir=/usr/local/Cellar
    ==> make install
    /usr/local/Cellar/gdbm/1.9.1: 10 files, 224K, built in 9 seconds
    ==> Installing python
    ==> Downloading http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
    ######################################################################## 100.0%
    ==> Patching
    patching file Lib/whichdb.py
    Hunk #1 succeeded at 91 with fuzz 1.
    ==> ./configure --prefix=/usr/local/Cellar/python/2.7.2 --enable-framework=/usr/
    ==> make
    ==> make install
    ==> Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0
    ######################################################################## 100.0%
    ==> /usr/local/Cellar/python/2.7.2/bin/python setup.py install
    Before install bootstrap.
    Scanning installed packages
    No setuptools distribution found
    running install
    error: can't create or remove files in install directory

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

        [Errno 13] Permission denied: '/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/test-easy-install-37718.write-test'

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

        /usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.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.

    For information on other options, you may wish to consult the
    documentation at:

      http://packages.python.org/distribute/easy_install.html

    Please make the appropriate changes for your system and try again.

    ==> Exit Status: 1
    http://github.com/mxcl/homebrew/blob/master/Library/Formula/python.rb#L106
    ==> Environment
    gcc-4.2: error trying to exec '/usr/bin/i686-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
    HOMEBREW_VERSION: 0.8
    HEAD: 67da1952979f60b776f1b986850e45b98c4ccaa9
    HOMEBREW_PREFIX: /usr/local
    HOMEBREW_CELLAR: /usr/local/Cellar
    HOMEBREW_REPOSITORY: /usr/local
    HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
    Hardware: dual-core 64-bit penryn
    OS X: 10.7.2
    Kernel Architecture: x86_64
    Ruby: 1.8.7-249
    /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
    Xcode: 4.2.1
    GCC-4.0: N/A
    GCC-4.2: build 0
    LLVM: build 2336
    Clang: 3.0-211.12
    MacPorts or Fink? /opt/local/bin/port
    X11 installed? true
    ==> Build Flags
    CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
    CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
    LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
    CFLAGS: -O3 -w -pipe -march=core2 -msse4.1
    CXXFLAGS: -O3 -w -pipe -march=core2 -msse4.1
    CPPFLAGS: -I/usr/local/Cellar/readline/6.2.1/include
    LDFLAGS: -L/usr/local/Cellar/readline/6.2.1/lib
    PKG_CONFIG_PATH: /usr/local/Cellar/readline/6.2.1/lib/pkgconfig

    Error: Failed executing: /usr/local/Cellar/python/2.7.2/bin/python setup.py install
    These existing issues may help you:
        https://github.com/mxcl/homebrew/issues/6233
        https://github.com/mxcl/homebrew/issues/6984
        https://github.com/mxcl/homebrew/issues/7687
        https://github.com/mxcl/homebrew/issues/8070
        https://github.com/mxcl/homebrew/issues/8713
        https://github.com/mxcl/homebrew/issues/9017
        https://github.com/mxcl/homebrew/issues/9167
        https://github.com/mxcl/homebrew/issues/9215
        https://github.com/mxcl/homebrew/issues/9345
        https://github.com/mxcl/homebrew/issues/9370
        https://github.com/mxcl/homebrew/issues/9434
        https://github.com/mxcl/homebrew/issues/9489
    Otherwise, please report the bug:
        https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
    familys-imac:~ Paul-Arthur$ brew install pip
    Error: No available formula for pip
    Install pip with easy_install:

        easy_install pip
    familys-imac:~ Paul-Arthur$ easy_install pip
    Searching for pip
    Best match: pip 1.0.2
    Processing pip-1.0.2-py2.6.egg
    pip 1.0.2 is already the active version in easy-install.pth
    Installing pip script to /Library/Frameworks/Python.framework/Versions/2.6/bin
    error: /Library/Frameworks/Python.framework/Versions/2.6/bin/pip: Permission denied
    familys-imac:~ Paul-Arthur$ export PATH=/usr/local/bin:$PATH
    familys-imac:~ Paul-Arthur$ brew install readline sqlite gdbm pkg-config
    Error: sqlite already installed
    Try: brew upgrade sqlite
    familys-imac:~ Paul-Arthur$ brew install python --framework --universal
    Warning: It appears you have MacPorts or Fink installed.
    Software installed with other package managers causes known problems for
    Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
    ==> Downloading http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
    File already downloaded in /Users/Paul-Arthur/Library/Caches/Homebrew
    ==> Patching
    patching file Lib/whichdb.py
    Hunk #1 succeeded at 91 with fuzz 1.
    ==> ./configure --prefix=/usr/local/Cellar/python/2.7.2 --enable-universalsdk=/ 
    ==> make
    ==> make install
    ==> Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0
    File already downloaded in /Users/Paul-Arthur/Library/Caches/Homebrew
    ==> /usr/local/Cellar/python/2.7.2/bin/python setup.py install
    Before install bootstrap.
    Scanning installed packages
    No setuptools distribution found
    running install
    error: can't create or remove files in install directory

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

        [Errno 13] Permission denied: '/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/test-easy-install-51610.write-test'

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

        /usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/lib/python2.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.

    For information on other options, you may wish to consult the
    documentation at:

      http://packages.python.org/distribute/easy_install.html

    Please make the appropriate changes for your system and try again.

    ==> Exit Status: 1
    http://github.com/mxcl/homebrew/blob/master/Library/Formula/python.rb#L106
    ==> Environment
    gcc-4.2: error trying to exec '/usr/bin/i686-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
    HOMEBREW_VERSION: 0.8
    HEAD: 67da1952979f60b776f1b986850e45b98c4ccaa9
    HOMEBREW_PREFIX: /usr/local
    HOMEBREW_CELLAR: /usr/local/Cellar
    HOMEBREW_REPOSITORY: /usr/local
    HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
    Hardware: dual-core 64-bit penryn
    OS X: 10.7.2
    Kernel Architecture: x86_64
    Ruby: 1.8.7-249
    /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
    Xcode: 4.2.1
    GCC-4.0: N/A
    GCC-4.2: build 0
    LLVM: build 2336
    Clang: 3.0-211.12
    MacPorts or Fink? /opt/local/bin/port
    X11 installed? true
    ==> Build Flags
    CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
    CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
    LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
    CFLAGS: -O3 -w -pipe -march=core2 -msse4.1
    CXXFLAGS: -O3 -w -pipe -march=core2 -msse4.1
    CPPFLAGS: -I/usr/local/Cellar/readline/6.2.1/include
    LDFLAGS: -L/usr/local/Cellar/readline/6.2.1/lib
    PKG_CONFIG_PATH: /usr/local/Cellar/readline/6.2.1/lib/pkgconfig

    Error: Failed executing: /usr/local/Cellar/python/2.7.2/bin/python setup.py install
    These existing issues may help you:
        https://github.com/mxcl/homebrew/issues/6233
        https://github.com/mxcl/homebrew/issues/6984
        https://github.com/mxcl/homebrew/issues/7687
        https://github.com/mxcl/homebrew/issues/8070
        https://github.com/mxcl/homebrew/issues/8713
        https://github.com/mxcl/homebrew/issues/9017
        https://github.com/mxcl/homebrew/issues/9167
        https://github.com/mxcl/homebrew/issues/9215
        https://github.com/mxcl/homebrew/issues/9345
        https://github.com/mxcl/homebrew/issues/9370
        https://github.com/mxcl/homebrew/issues/9434
        https://github.com/mxcl/homebrew/issues/9489
    Otherwise, please report the bug:
        https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
    familys-imac:~ Paul-Arthur$ 
share|improve this question

migrated from stackoverflow.com Jan 13 '12 at 22:09

This question came from our site for professional and enthusiast programmers.

5  
The error messages say that you don't have write access to where it's trying to install. Could you try "sudo brew install python --framework"? –  DSM Jan 13 '12 at 21:37
    
@DSM, no you can't sudo brew install python --framework as that brew will cowardly refuse to do so. –  mfollett Feb 13 '12 at 18:35
    
@mfollett: Hmm. Well, it was worth a try. :^) Unfortunately I don't have an OS X box at the office to test-- is the usual process to change the permissions on the target directories? –  DSM Feb 13 '12 at 18:59
    
@DSM I'm pretty sure brew formulas are not supposed to attempt to write to locations that would require root access. I'm not really sure why the python formula is trying to do so in this case. –  mfollett Feb 17 '12 at 18:13
    
@DSM the only time I know of that brew will need to run as root is if you run brew link <package>. –  mfollett Feb 17 '12 at 18:14

1 Answer 1

You are installing the lib in system wide and have not permission at directory. Run your make install with sudo.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.