Python kann keine plattformabhängigen Bibliotheken finden - Installation von Mac Homebrew

4045
Pygmalion

Um meine Umgebung zu reinigen, habe ich kürzlich MacPorts und alle darin enthaltenen Spuren aus meiner Mac OS 10.6.6-Box entfernt und durch die neue Homebrew der Hüfte ersetzt ( https://github.com/mxcl/homebrew ).

Heute bin ich auf mein erstes Problem gestoßen. Ich versuche, Python 2.7.1 zu installieren (Mac OS X hat immer noch den Standard 2.6). Ich bin brew install pythonam Terminal gelaufen . Alles schien gut zu installieren. Als ich pythonjedoch lief, erhielt ich diese Ausgabe:

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. >>> 

Zuerst dachte ich, es wäre eine inkonsequente Fehlermeldung, aber nach weiterer Untersuchung habe ich festgestellt, dass Python seine Kernsystembibliotheken sehr vermisst. Ich habe versucht, zu deinstallieren / neu zu installieren, mit allen verschiedenen Werten herumzuspielen $PYTHONHOMEund $PYTHONPATHbisher kein Glück.

Was Systeminformationen angeht: brewscheint Python in installiert zu haben /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 

Vielen Dank im Voraus ... ich bin ratlos.

Edit: Hier ist die Ausgabe von 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'] >>>  
3
Hilft dieses Thema? (Http://superuser.com/questions/224744/getting-path-right-for-python-after-macports-install)? Daniel Beck vor 13 Jahren 0
In Python, was druckt sys.path Mark vor 13 Jahren 0
@ Daniel Beck: Nein, nicht ganz meine Ausgabe. Trotzdem danke! @Mark: Wird gerade bearbeitet, um sys.path anzuzeigen. Pygmalion vor 13 Jahren 0
Gibt es diese Pfade (in `sys.path`)? Daniel Beck vor 13 Jahren 0

0 Antworten auf die Frage