Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cannot do brew python... #19426

Closed
dlei opened this Issue · 7 comments

5 participants

@dlei

==> /usr/local/Cellar/python/2.7.3/bin/python -s setup.py --no-user-cfg install
File "/private/tmp/UNKNOWN-wAf5/distribute-0.6.35/pkg_resources.py", line 1211, in get_metadata
return self.get(self.fn(self.egg_info,name))
File "/private/tmp/__UNKNOWN
-wAf5/distribute-0.6.35/pkg_resources.py", line 1326, in _get
stream = open(path, 'rb')
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg/EGG-INFO/top_level.txt'
Error: Homebrew doesn't know what compiler versions ship with your version
of Xcode (4.6.2). Please brew update and if that doesn't help, file
an issue with the output of brew --config:
https://github.com/mxcl/homebrew/issues

HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: df7f810
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.8.3-x86_64
Xcode: 4.6.2
CLT: 4.5.0.0.1.1249367152
LLVM-GCC: build 2336
Clang: 4.1 build 421
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /Users/dlei/.rvm/rubies/ruby-1.9.3-p385/bin/ruby

@mistydemeo
Owner

What were you trying to install? Can you please read this, see if it helps, and post the requested logs: https://github.com/mxcl/homebrew/wiki/Troubleshooting

@dlei

I am trying to do brew install python...

What does this means?
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg/EGG-INFO/top_level.txt'

@cartesianJoin

dlei,

I'm having the same problem when trying to brew python, with the exception that you're getting an reference to the file that's causing the problem with the brew, whereas mine doesn't tell me what the problematic file is.

@samueljohn

You have probably some setuptools and/or distribute in /Library/Python/2.7/...
Test removing (or move it away) the /Library/Python/2.7/ dir and ~/Library/Python/2.7

Let me know if this helps.
I assume your PATH is so that /usr/local/bin comes first.

@cartesianJoin

@samueljohn, I have /usr/local/share/python as the first entry in PATH, then /usr/local/bin. Is that Ok?

In any case, I put the setuptools* files in a ./tmp directory under /Library/Python/2.7 and re-ran brew install python and it went further, beyond the "Permission denied" error. It compiled everything but had trouble linking. It kindly suggested what the fixes would be, I followed the advice to "brew link --overwrite python" and that seemed to work. When I run python I'm told I'm using version 2.7.4, which is what I was trying to get to, so looks like things have sorted themselves out.

Thanks for your advice.

Earl

@samueljohn

@cartesianJoin yes, this sounds good now from what you report. The issue was that a stray setuptools (from an older python installation) can lead to this error here. Not sure if I can find a proper fix, because it's the way python is designed to work (by that I mean python looks into /Library/Python to pick up additional packages).

@samueljohn samueljohn closed this
@samueljohn samueljohn was assigned
@wyy1991

"IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg/EGG-INFO/top_level.txt' "

I had the same error, which seems the file's permission was set to None to everyone. I fixed it by going into the directory of '/Library/Python/2.7/site-packages/httplib2-0.8-py2.7.egg/EGG-INFO/top_level.txt' and changed the permission of the file to "READONLY" to "everyone".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.