brew install python3
schlägt mit einem pyexpat-Fehler fehl, was bedeutet, dass das installierte Python XML nicht analysieren kann (brechen pip
usw.). Hier der entsprechende Auszug aus ~/Library/Logs/Homebrew/python/02.make
:
*** WARNING: renaming "pyexpat" since importing it failed: dlopen(build/lib.macosx-10.13-x86_64-3.7/pyexpat.cpython-37m-darwin.so, 2): Symbol not found: _XML_ErrorString
Referenced from: build/lib.macosx-10.13-x86_64-3.7/pyexpat.cpython-37m-darwin.so
Expected in: flat namespace
in build/lib.macosx-10.13-x86_64-3.7/pyexpat.cpython-37m-darwin.so
nm -gU /usr/lib/libexpat.1.dylib
zeigt, dass dieses Symbol dort definiert ist, aber laut otool -L
der pyexpat- .so
Datei wird es nicht erwähnt; seine einzige Abhängigkeit ist:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
Nochmals von 02.make
, so .so
wurde das pyexpat erstellt (ich habe Zeilenumbrüche hinzugefügt, um es besser lesbar zu machen):
clang \
-bundle \
-undefined dynamic_lookup \
-isysroot \
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk \
build/temp.macosx-10.13-x86_64-3.7/private/tmp/python-20180929-40812-11ki5rr/Python-3.7.0/Modules/pyexpat.o \
build/temp.macosx-10.13-x86_64-3.7/private/tmp/python-20180929-40812-11ki5rr/Python-3.7.0/Modules/expat/xmlparse.o \
build/temp.macosx-10.13-x86_64-3.7/private/tmp/python-20180929-40812-11ki5rr/Python-3.7.0/Modules/expat/xmlrole.o \
build/temp.macosx-10.13-x86_64-3.7/private/tmp/python-20180929-40812-11ki5rr/Python-3.7.0/Modules/expat/xmltok.o \
-L/usr/local/lib \
-o build/lib.macosx-10.13-x86_64-3.7/pyexpat.cpython-37m-darwin.so
Ich verwende XCode 9.4.1 auf Mac OS 10.13.6 (17G65). Andere Berichte weisen darauf hin, dass das Problem darin bestehen könnte, dass meine Xcode-Version neuer ist als meine macOS-Version, aber aufgrund von Arbeitsrichtlinien kann ich noch nicht auf Mojave upgraden.
Irgendwelche Ideen, wie ich eine funktionierende Python 3-Installation bekommen kann?
Ich habe das schließlich behoben, indem ich
Peter
Paul Croley