I have 2 pythons on my mac (10.8.3): The default, and 2.7 version from homebrew.
So far, I could install modules and use them with my brew python. I installed mapnik with brew install mapnik
(mapnik-2.1.0) and it compiled correctly. But, if I open python and enter import mapnik
, the following error comes and python exits:
>>> import mapnik Fatal Python error: PyThreadState_Get: no current thread Abort trap: 6
Mac os x also shows an error window, with the following content:
Process: Python [60666] Path: /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 2.7.3 (2.7.3) Code Type: X86-64 (Native) Parent Process: bash [60454] User ID: 501 Date/Time: 2013-03-28 10:21:08.535 +0100 OS Version: Mac OS X 10.8.3 (12D78) Report Version: 10 Interval Since Last Report: 128837 sec Crashes Since Last Report: 5 Per-App Crashes Since Last Report: 4 Anonymous UUID: 567121E6-7BAC-335F-E3B0-DD24D1F9E6BA Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Application Specific Information: abort() called Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff94500d46 __kill + 10 1 libsystem_c.dylib 0x00007fff92afddf0 abort + 177 2 org.python.python 0x0000000105a77eaa Py_FatalError + 49 3 org.python.python 0x0000000105a76370 PyThreadState_Get + 28 4 org.python.python 0x0000000105a71f16 Py_InitModule4_64 + 58 5 libboost_python-mt.dylib 0x0000000104153288 boost::python::detail::init_module(char const*, void (*)()) + 40 6 org.python.python 0x00000001029fa716 _PyImport_LoadDynamicModule + 150 7 org.python.python 0x00000001029fa428 import_submodule + 296 8 org.python.python 0x00000001029f9ff1 load_next + 268 9 org.python.python 0x00000001029f80fb PyImport_ImportModuleLevel + 794 10 org.python.python 0x00000001029de9d3 builtin___import__ + 132 11 org.python.python 0x000000010296e335 PyObject_Call + 101 12 org.python.python 0x00000001029e8e10 PyEval_CallObjectWithKeywords + 93 13 org.python.python 0x00000001029e61b6 PyEval_EvalFrameEx + 11727 14 org.python.python 0x00000001029e32bd PyEval_EvalCodeEx + 1638 15 org.python.python 0x00000001029e2c51 PyEval_EvalCode + 54 16 org.python.python 0x00000001029f6e58 PyImport_ExecCodeModuleEx + 247 17 org.python.python 0x00000001029f99bf load_source_module + 1053 18 org.python.python 0x00000001029f9c7e load_package + 334 19 org.python.python 0x00000001029fa428 import_submodule + 296 20 org.python.python 0x00000001029f9ff1 load_next + 268 21 org.python.python 0x00000001029f80fb PyImport_ImportModuleLevel + 794 22 org.python.python 0x00000001029de9d3 builtin___import__ + 132 23 org.python.python 0x000000010296e335 PyObject_Call + 101 24 org.python.python 0x00000001029e8e10 PyEval_CallObjectWithKeywords + 93 25 org.python.python 0x00000001029e61b6 PyEval_EvalFrameEx + 11727 26 org.python.python 0x00000001029e32bd PyEval_EvalCodeEx + 1638 27 org.python.python 0x00000001029e2c51 PyEval_EvalCode + 54 28 org.python.python 0x0000000102a01a2b run_mod + 53 29 org.python.python 0x0000000102a0184d PyRun_InteractiveOneFlags + 365 30 org.python.python 0x0000000102a01367 PyRun_InteractiveLoopFlags + 188 31 org.python.python 0x0000000102a01218 PyRun_AnyFileExFlags + 60 32 org.python.python 0x0000000102a120b2 Py_Main + 3210 33 libdyld.dylib 0x00007fff966bf7e1 start + 1 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x00007fff5d29c2b0 rcx: 0x00007fff5d29c298 rdx: 0x0000000000000000 rdi: 0x000000000000ecfa rsi: 0x0000000000000006 rbp: 0x00007fff5d29c2c0 rsp: 0x00007fff5d29c298 r8: 0x00000000000003f5 r9: 0x00007fff5d29c270 r10: 0x00007fff94502342 r11: 0x0000000000000206 r12: 0x00007fff5d29cb00 r13: 0x0000000102e9b656 r14: 0x00000000000003f5 r15: 0x0000000000000000 rip: 0x00007fff94500d46 rfl: 0x0000000000000206 cr2: 0x00007fff7bff7ff0 Logical CPU: 0 Binary Images: 0x102961000 - 0x102961fff +org.python.python (2.7.3 - 2.7.3) /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python 0x102964000 - 0x102a6cfff +org.python.python (2.7.3, [c] 2004-2012 Python Software Foundation. - 2.7.3) /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/Python 0x102c4c000 - 0x102c4efff +readline.so (0) /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so 0x102c54000 - 0x102c77fff +libreadline.6.2.dylib (6.2) /usr/local/opt/readline/lib/libreadline.6.2.dylib 0x102cfc000 - 0x102d01fff +itertools.so (0) /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so 0x102d0a000 - 0x102f2cfff +_mapnik.so (0) /usr/local/lib/python2.7/site-packages/mapnik/_mapnik.so 0x103603000 - 0x103978ff7 +libmapnik.dylib (0) /usr/local/Cellar/mapnik/2.1.0/lib/libmapnik.dylib 0x104138000 - 0x104170ff7 +libboost_python-mt.dylib (0) /usr/local/lib/libboost_python-mt.dylib 0x1041b3000 - 0x1041c2ff7 +libboost_thread-mt.dylib (0) /usr/local/lib/libboost_thread-mt.dylib 0x1041de000 - 0x10424dff7 +libfreetype.6.dylib (0) /usr/local/lib/libfreetype.6.dylib 0x104262000 - 0x104268fff +libltdl.7.dylib (0) /usr/local/lib/libltdl.7.dylib 0x10426c000 - 0x10428bff7 +libpng15.15.dylib (0) /usr/local/lib/libpng15.15.dylib 0x104293000 - 0x1042e6fff +libtiff.5.dylib (0) /usr/local/lib/libtiff.5.dylib 0x1042f2000 - 0x104326fff +libproj.0.dylib (0) /usr/local/lib/libproj.0.dylib 0x104333000 - 0x104441ff7 +libicuuc.50.1.dylib (0) /usr/local/opt/icu4c/lib/libicuuc.50.1.dylib 0x1044a3000 - 0x1044b2fff +libboost_filesystem-mt.dylib (0) /usr/local/lib/libboost_filesystem-mt.dylib 0x1044c3000 - 0x1044c5ff7 +libboost_system-mt.dylib (0) /usr/local/lib/libboost_system-mt.dylib 0x1044ca000 - 0x104578fff +libboost_regex-mt.dylib (0) /usr/local/lib/libboost_regex-mt.dylib 0x10461c000 - 0x10464bff7 +libjpeg.8.dylib (0) /usr/local/lib/libjpeg.8.dylib 0x104652000 - 0x105a24fff +libicudata.50.dylib (0) /usr/local/opt/icu4c/lib/libicudata.50.dylib 0x105a26000 - 0x105b33fff org.python.python (2.7.2 - 2.7.2) /System/Library/Frameworks/Python.framework/Versions/2.7/Python 0x7fff62561000 - 0x7fff6259593f dyld (210.2.3) /usr/lib/dyld 0x7fff8ae57000 - 0x7fff8ae7cff7 libc++abi.dylib (26) /usr/lib/libc++abi.dylib 0x7fff8c50f000 - 0x7fff8c510ff7 libsystem_sandbox.dylib (220.2) /usr/lib/system/libsystem_sandbox.dylib 0x7fff8c511000 - 0x7fff8c523ff7 libz.1.dylib (43) /usr/lib/libz.1.dylib 0x7fff8d337000 - 0x7fff8d342fff libsystem_notify.dylib (98.5) /usr/lib/system/libsystem_notify.dylib 0x7fff8d9e6000 - 0x7fff8d9ebfff libcompiler_rt.dylib (30) /usr/lib/system/libcompiler_rt.dylib 0x7fff8dd72000 - 0x7fff8dd73fff libDiagnosticMessagesClient.dylib (8) /usr/lib/libDiagnosticMessagesClient.dylib 0x7fff902d7000 - 0x7fff90326ff7 libcorecrypto.dylib (106.2) /usr/lib/system/libcorecrypto.dylib 0x7fff9064f000 - 0x7fff90650fff libsystem_blocks.dylib (59) /usr/lib/system/libsystem_blocks.dylib 0x7fff90a75000 - 0x7fff90a7dff7 libsystem_dnssd.dylib (379.37) /usr/lib/system/libsystem_dnssd.dylib 0x7fff914fd000 - 0x7fff9150afff libbz2.1.0.dylib (29) /usr/lib/libbz2.1.0.dylib 0x7fff92899000 - 0x7fff928a7fff libcommonCrypto.dylib (60027) /usr/lib/system/libcommonCrypto.dylib 0x7fff92aa4000 - 0x7fff92b70ff7 libsystem_c.dylib (825.26) /usr/lib/system/libsystem_c.dylib 0x7fff92bba000 - 0x7fff92bc0ff7 libunwind.dylib (35.1) /usr/lib/system/libunwind.dylib 0x7fff92ed3000 - 0x7fff92f3cfff libstdc++.6.dylib (56) /usr/lib/libstdc++.6.dylib 0x7fff93019000 - 0x7fff93065ff7 libauto.dylib (185.1) /usr/lib/libauto.dylib 0x7fff930cf000 - 0x7fff930d5fff libmacho.dylib (829) /usr/lib/system/libmacho.dylib 0x7fff93177000 - 0x7fff93199ff7 libxpc.dylib (140.42) /usr/lib/system/libxpc.dylib 0x7fff931f6000 - 0x7fff931f7ff7 libremovefile.dylib (23.2) /usr/lib/system/libremovefile.dylib 0x7fff931f8000 - 0x7fff93260ff7 libc++.1.dylib (65.1) /usr/lib/libc++.1.dylib 0x7fff9345d000 - 0x7fff9365dfff libicucore.A.dylib (491.11.2) /usr/lib/libicucore.A.dylib 0x7fff9365e000 - 0x7fff9365efff libkeymgr.dylib (25) /usr/lib/system/libkeymgr.dylib 0x7fff936d4000 - 0x7fff936dcfff liblaunch.dylib (442.26.2) /usr/lib/system/liblaunch.dylib 0x7fff9424d000 - 0x7fff9427bff7 libsystem_m.dylib (3022.6) /usr/lib/system/libsystem_m.dylib 0x7fff94284000 - 0x7fff94286fff libquarantine.dylib (52) /usr/lib/system/libquarantine.dylib 0x7fff94381000 - 0x7fff94382ff7 libdnsinfo.dylib (453.19) /usr/lib/system/libdnsinfo.dylib 0x7fff944ef000 - 0x7fff9450aff7 libsystem_kernel.dylib (2050.22.13) /usr/lib/system/libsystem_kernel.dylib 0x7fff94579000 - 0x7fff94587ff7 libsystem_network.dylib (77.10) /usr/lib/system/libsystem_network.dylib 0x7fff94821000 - 0x7fff9493992f libobjc.A.dylib (532.2) /usr/lib/libobjc.A.dylib 0x7fff9493a000 - 0x7fff9494fff7 libdispatch.dylib (228.23) /usr/lib/system/libdispatch.dylib 0x7fff95c25000 - 0x7fff95d22ff7 libxml2.2.dylib (22.3) /usr/lib/libxml2.2.dylib 0x7fff96350000 - 0x7fff96351ff7 libSystem.B.dylib (169.3) /usr/lib/libSystem.B.dylib 0x7fff96397000 - 0x7fff9639cfff libcache.dylib (57) /usr/lib/system/libcache.dylib 0x7fff96646000 - 0x7fff9664dfff libcopyfile.dylib (89) /usr/lib/system/libcopyfile.dylib 0x7fff966bd000 - 0x7fff966c0ff7 libdyld.dylib (210.2.3) /usr/lib/system/libdyld.dylib 0x7fff96961000 - 0x7fff96963ff7 libunc.dylib (25) /usr/lib/system/libunc.dylib 0x7fff974ba000 - 0x7fff974f0fff libsystem_info.dylib (406.17) /usr/lib/system/libsystem_info.dylib 0x7fff97850000 - 0x7fff97888fff libncurses.5.4.dylib (37.3) /usr/lib/libncurses.5.4.dylib 0x7fff978d3000 - 0x7fff97abdff7 com.apple.CoreFoundation (6.8 - 744.18) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 18730 thread_create: 2 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=109.5M resident=53.3M(49%) swapped_out_or_unallocated=56.2M(51%) Writable regions: Total=20.6M written=2644K(13%) resident=3256K(15%) swapped_out=0K(0%) unallocated=17.5M(85%) REGION TYPE VIRTUAL =========== ======= MALLOC 11.8M MALLOC guard page 32K STACK GUARD 56.0M Stack 8192K __DATA 2356K __LINKEDIT 68.3M __TEXT 41.2M __UNICODE