3
2
In an effort to purify my environment I have recently eliminated MacPorts and all traces therein from my Mac OS 10.6.6 box, replacing it with the hip new Homebrew (https://github.com/mxcl/homebrew).
Today I ran into my first problem. I'm attempting to install Python 2.7.1 (Mac OS X still defaults to 2.6). I ran brew install python
at the Terminal. Everything seemed to install fine. When I ran python
however, I received this output:
pygmalion:~:% python
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 2.7.1 (r271:86832, Jan 24 2011, 12:12:00)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
At first I thought it was an inconsequential error message, but upon further investigation, I've come to see that Python is very much lacking its core system libraries. I've tried uninstalling/reinstalling, playing around with all different values for $PYTHONHOME
and $PYTHONPATH
but so far no luck.
As far as system information: brew
appears to have installed Python in /usr/local/bin/python
.
pygmalion:~:% brew --config
HOMEBREW_VERSION: 0.7.1
HEAD: 38b93387ea732d6c6b08a491f74124854b28107a
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.6.6
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 3.2.5
GCC-4.0: build 5494
GCC-4.2: build 5664
LLVM: build 2333
MacPorts or Fink? false
X11 installed? true
Thanks in advance... I'm at a loss.
Edit: Here is the output of sys.path
.
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 2.7.1 (r271:86832, Jan 24 2011, 12:12:00)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/local/Cellar/python/2.7.1/lib/python27.zip', '/usr/local/Cellar/python/2.7.1/lib/python2.7', '/usr/local/Cellar/python/2.7.1/lib/python2.7/plat-darwin', '/usr/local/Cellar/python/2.7.1/lib/python2.7/plat-mac', '/usr/local/Cellar/python/2.7.1/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/Cellar/python/2.7.1/lib/python2.7/lib-tk', '/usr/local/Cellar/python/2.7.1/lib/python2.7/lib-old', '/usr/local/Cellar/python/2.7.1/lib/lib-dynload', '/Users/dlobraico/.local/lib/python2.7/site-packages', '/usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages', '/usr/local/lib/python2.7/site-packages', '/usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages']
>>>
Does this topic help?
– Daniel Beck – 2011-01-24T19:20:31.943In python what does print sys.path show – user151019 – 2011-01-24T20:33:12.167
@Daniel Beck: No, not quite my issue. Thanks though! @Mark: Just edited to show sys.path. – Pygmalion – 2011-01-25T03:33:41.963
Do these paths (in
sys.path
) exist? – Daniel Beck – 2011-01-25T05:24:26.647