我的Macbook(Yosemite 10.10)中安装了MacVim,Vim和Python 2.7.10。按照以下命令为MacVim安装插件后,我打开了vim / MacVim并且所有人都收到了“致命的python错误pythreadstate_get no current thread”错误。但我不知道为什么。有人可以帮我解决吗?
以下命令:
# need sudo
mv /usr/bin/vim /usr/bin/vim.bk
ln -s /usr/local/bin/mvim /usr/bin/vim
# insert into .bashrc/.bash_profile:
alias vi='mvim -v'
alias vim='mvim -v'
以下错误:
Process: Python [690]
Path: /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.7.10 (2.7.10)
Code Type: X86-64 (Native)
Parent Process: vim [687]
Responsible: Terminal [236]
User ID: 501
Date/Time: 2015-07-18 20:47:59.659 +0800
OS Version: Mac OS X 10.10.3 (14D136)
Report Version: 11
Anonymous UUID: CD36E920-02F5-B707-810C-6A1616B5D917
Time Awake Since Boot: 460 seconds
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 0x00007fff91015286 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff9039cb53 abort + 129
2 org.python.python 0x0000000108ceaa57 Py_FatalError + 49
3 org.python.python 0x0000000108ce9f39 PyThreadState_Get + 28
4 org.python.python 0x0000000108ce6d96 Py_InitModule4_64 + 62
5 ycm_client_support.so 0x0000000108bbebf3 boost::python::detail::init_module(char const*, void (*)()) + 35
6 org.python.python 0x00000001088c9327 _PyImport_LoadDynamicModule + 140
7 org.python.python 0x00000001088c9003 import_submodule + 270
8 org.python.python 0x00000001088c8bc6 load_next + 284
9 org.python.python 0x00000001088c6b5d PyImport_ImportModuleLevel + 453
10 org.python.python 0x00000001088ac641 builtin___import__ + 135
11 org.python.python 0x0000000108837ad7 PyObject_Call + 99
12 org.python.python 0x00000001088b6e2e PyEval_CallObjectWithKeywords + 93
13 org.python.python 0x00000001088b3274 PyEval_EvalFrameEx + 8334
14 org.python.python 0x00000001088b0fb4 PyEval_EvalCodeEx + 1387
15 org.python.python 0x00000001088b0a43 PyEval_EvalCode + 54
16 org.python.python 0x00000001088d0816 run_mod + 53
17 org.python.python 0x00000001088d08b9 PyRun_FileExFlags + 133
18 org.python.python 0x00000001088d03f9 PyRun_SimpleFileExFlags + 711
19 org.python.python 0x00000001088e1e09 Py_Main + 3057
20 libdyld.dylib 0x00007fff94df45c9 start + 1
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff573da0d8 rdx: 0x0000000000000000
rdi: 0x0000000000000713 rsi: 0x0000000000000006 rbp: 0x00007fff573da100 rsp: 0x00007fff573da0d8
r8: 0x00007fff573da0f0 r9: 0x00007fff79699300 r10: 0x0000000008000000 r11: 0x0000000000000206
r12: 0x00007fe63101b200 r13: 0x0000000108bf909e r14: 0x00007fff79699300 r15: 0x0000000108959108
rip: 0x00007fff91015286 rfl: 0x0000000000000206 cr2: 0x00007fff788eefd8
Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133
Binary Images:
0x108825000 - 0x108826fff +org.python.python (2.7.10 - 2.7.10) <45F60428-1330-3E97-942D-4B32CE803C41> /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
0x10882d000 - 0x10891efff +org.python.python (2.7.10, [c] 2001-2015 Python Software Foundation. - 2.7.10) <5D0AE21E-77B6-345E-B3A2-4DD5429C2327> /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/Python
0x1089cb000 - 0x1089dafff libSimplifiedChineseConverter.dylib (64) <468DE6E1-42B9-3751-ACA5-7D16C550FF84> /System/Library/CoreServices/Encodings/libSimplifiedChineseConverter.dylib
0x108b0f000 - 0x108b11fff +_locale.so (0) <8C25BC60-39E5-3254-8186-909944B8174C> /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
0x108b94000 - 0x108bfeff7 +ycm_client_support.so (0) <C29A3B47-A62C-3211-9A7E-896659FEFD09> /Users/USER/*/ycm_client_support.so
0x108c48000 - 0x108d39ff7 org.python.python (2.7.6 - 2.7.6) <A5C1B694-31A0-3966-B6BC-C40694DC707F> /System/Library/Frameworks/Python.framework/Versions/2.7/Python
0x7fff6ba2f000 - 0x7fff6ba65837 dyld (353.2.1) <65DCCB06-339C-3E25-9702-600A28291D0E> /usr/lib/dyld
0x7fff878b6000 - 0x7fff878ccff7 libsystem_asl.dylib (267) <F153AC5B-0542-356E-88C8-20A62CA704E2> /usr/lib/system/libsystem_asl.dylib
0x7fff878cd000 - 0x7fff87ac746f libobjc.A.dylib (647) <759E155D-BC42-3D4E-869B-6F57D477177C> /usr/lib/libobjc.A.dylib
0x7fff87af6000 - 0x7fff87af8fff libsystem_sandbox.dylib (358.20.5) <4CF77128-6BE0-3958-B646-707FA9CE61B2> /usr/lib/system/libsystem_sandbox.dylib
0x7fff87fb3000 - 0x7fff87fb4ffb libremovefile.dylib (35) <3485B5F4-6CE8-3C62-8DFD-8736ED6E8531> /usr/lib/system/libremovefile.dylib
0x7fff88b10000 - 0x7fff88b10ff7 libkeymgr.dylib (28) <77845842-DE70-3CC5-BD01-C3D14227CED5> /usr/lib/system/libkeymgr.dylib
0x7fff88b60000 - 0x7fff88b68ffb libcopyfile.dylib (118.1.2) <0C68D3A6-ACDD-3EF3-991A-CC82C32AB836> /usr/lib/system/libcopyfile.dylib
0x7fff89026000 - 0x7fff8904efff libsystem_info.dylib (459.20.1) <AEB3FE62-4763-3050-8352-D6F9AF961AE6> /usr/lib/system/libsystem_info.dylib
0x7fff89292000 - 0x7fff89294fff libsystem_configuration.dylib (699.1.5) <20F3B077-179D-3CB0-A3C1-C8602D53B4DB> /usr/lib/system/libsystem_configuration.dylib
0x7fff8984a000 - 0x7fff89890ff7 libauto.dylib (186) <A260789B-D4D8-316A-9490-254767B8A5F1> /usr/lib/libauto.dylib
0x7fff89978000 - 0x7fff89b5dff7 libicucore.A.dylib (531.48) <3CD34752-B1F9-31D2-865D-B5B0F0BE3111> /usr/lib/libicucore.A.dylib
0x7fff8a22d000 - 0x7fff8a5c5ff7 com.apple.CoreFoundation (6.9 - 1153.18) <5C0892B8-9691-341F-9279-CA3A74D59AA0> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff8ae3a000 - 0x7fff8ae6afff libsystem_m.dylib (3086.1) <1E12AB45-6D96-36D0-A226-F24D9FB0D9D6> /usr/lib/system/libsystem_m.dylib
0x7fff8c93b000 - 0x7fff8c940ff7 libmacho.dylib (862) <126CA2ED-DE91-308F-8881-B9DAEC3C63B6> /usr/lib/system/libmacho.dylib
0x7fff8c941000 - 0x7fff8c96cfff libc++abi.dylib (125) <88A22A0F-87C6-3002-BFBA-AC0F2808B8B9> /usr/lib/libc++abi.dylib
0x7fff8cf15000 - 0x7fff8cf3dfff libxpc.dylib (559.20.9) <D35D0DB2-D7BD-3BE4-8378-062BFE545E1D> /usr/lib/system/libxpc.dylib
0x7fff8d298000 - 0x7fff8d2a3fff libcommonCrypto.dylib (60061) <D381EBC6-69D8-31D3-8084-5A80A32CB748> /usr/lib/system/libcommonCrypto.dylib
0x7fff8d68b000 - 0x7fff8d68dff7 libsystem_coreservices.dylib (9) <41B7C578-5A53-31C8-A96F-C73E030B0938> /usr/lib/system/libsystem_coreservices.dylib
0x7fff8db93000 - 0x7fff8db97fff libcache.dylib (69) <45E9A2E7-99C4-36B2-BEE3-0C4E11614AD1> /usr/lib/system/libcache.dylib
0x7fff9033f000 - 0x7fff903cbff7 libsystem_c.dylib (1044.10.1) <86FBED7A-F2C8-3591-AD6F-486DD57E6B6A> /usr/lib/system/libsystem_c.dylib
0x7fff90fff000 - 0x7fff9101cfff libsystem_kernel.dylib (2782.20.48) <EAFD7BD0-0C30-3E7D-9528-F9916BA0167C> /usr/lib/system/libsystem_kernel.dylib
0x7fff91213000 - 0x7fff91214fff libsystem_secinit.dylib (18) <581DAD0F-6B63-3A48-B63B-917AF799ABAA> /usr/lib/system/libsystem_secinit.dylib
0x7fff91580000 - 0x7fff91585ff7 libunwind.dylib (35.3) <BE7E51A0-B6EA-3A54-9CCA-9D88F683A6D6> /usr/lib/system/libunwind.dylib
0x7fff91779000 - 0x7fff917a3ff7 libdispatch.dylib (442.1.4) <502CF32B-669B-3709-8862-08188225E4F0> /usr/lib/system/libdispatch.dylib
0x7fff92c97000 - 0x7fff92c9dfff libsystem_trace.dylib (72.20.1) <840F5301-B55A-3078-90B9-FEFFD6CD741A> /usr/lib/system/libsystem_trace.dylib
0x7fff92c9e000 - 0x7fff92ca6fff libsystem_platform.dylib (63) <64E34079-D712-3D66-9CE2-418624A5C040> /usr/lib/system/libsystem_platform.dylib
0x7fff92ca7000 - 0x7fff92cfbfff libc++.1.dylib (120) <1B9530FD-989B-3174-BB1C-BDC159501710> /usr/lib/libc++.1.dylib
0x7fff94931000 - 0x7fff94937ff7 libsystem_networkextension.dylib (167.1.10) <29AB225B-D7FB-30ED-9600-65D44B9A9442> /usr/lib/system/libsystem_networkextension.dylib
0x7fff94957000 - 0x7fff9498ffff libsystem_network.dylib (412.20.3) <589A5F67-BE2A-3245-A181-0ECC9B53EB00> /usr/lib/system/libsystem_network.dylib
0x7fff94da0000 - 0x7fff94da2fff libquarantine.dylib (76.20.1) <7AF90041-2768-378A-925A-D83161863642> /usr/lib/system/libquarantine.dylib
0x7fff94df1000 - 0x7fff94df4ff7 libdyld.dylib (353.2.1) <9EACCA38-291D-38CC-811F-7E9D1451E2D3> /usr/lib/system/libdyld.dylib
0x7fff94faf000 - 0x7fff94fb4fff libsystem_stats.dylib (163.20.16) <FBC3F80F-A0FB-3BD6-9A7E-800DE45F092E> /usr/lib/system/libsystem_stats.dylib
0x7fff95025000 - 0x7fff95041ff7 libsystem_malloc.dylib (53.1.1) <19BCC257-5717-3502-A71F-95D65AFA861B> /usr/lib/system/libsystem_malloc.dylib
0x7fff95094000 - 0x7fff95095ff3 libSystem.B.dylib (1213) <CCEC13A5-D0D9-31C5-B0B0-1C564B4A20A6> /usr/lib/libSystem.B.dylib
0x7fff9558f000 - 0x7fff955a0ff7 libz.1.dylib (55) <88C7C7DE-04B8-316F-8B74-ACD9F3DE1AA1> /usr/lib/libz.1.dylib
0x7fff957b1000 - 0x7fff957b9fff libsystem_dnssd.dylib (561.1.1) <62B70ECA-E40D-3C63-896E-7F00EC386DDB> /usr/lib/system/libsystem_dnssd.dylib
0x7fff958a3000 - 0x7fff958acff7 libsystem_notify.dylib (133.1.1) <61147800-F320-3DAA-850C-BADF33855F29> /usr/lib/system/libsystem_notify.dylib
0x7fff95a5c000 - 0x7fff95a6dfff libsystem_coretls.dylib (35.20.2) <6084A531-2523-39F8-B030-811FA1A32FB5> /usr/lib/system/libsystem_coretls.dylib
0x7fff95b62000 - 0x7fff95b6bfff libsystem_pthread.dylib (105.10.1) <3103AA7F-3BAE-3673-9649-47FFD7E15C97> /usr/lib/system/libsystem_pthread.dylib
0x7fff95f8f000 - 0x7fff95f96ff7 libcompiler_rt.dylib (35) <BF8FC133-EE10-3DA6-9B90-92039E28678F> /usr/lib/system/libcompiler_rt.dylib
0x7fff9642b000 - 0x7fff9642cff7 libsystem_blocks.dylib (65) <9615D10A-FCA7-3BE4-AA1A-1B195DACE1A1> /usr/lib/system/libsystem_blocks.dylib
0x7fff96442000 - 0x7fff96442ff7 libunc.dylib (29) <5676F7EA-C1DF-329F-B006-D2C3022B7D70> /usr/lib/system/libunc.dylib
0x7fff9709a000 - 0x7fff9709bfff libDiagnosticMessagesClient.dylib (100) <2EE8E436-5CDC-34C5-9959-5BA218D507FB> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff970af000 - 0x7fff970afff7 liblaunch.dylib (559.20.9) <FA89A113-696E-3271-8FE1-A0D7324E8481> /usr/lib/system/liblaunch.dylib
0x7fff970b1000 - 0x7fff97127fe7 libcorecrypto.dylib (233.1.2) <E1789801-3985-3949-B736-6B3378873301> /usr/lib/system/libcorecrypto.dylib
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: 255
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=85.2M resident=30.3M(36%) swapped_out_or_unallocated=54.9M(64%)
Writable regions: Total=19.2M written=2232K(11%) resident=3872K(20%) swapped_out=0K(0%) unallocated=15.5M(80%)
REGION TYPE VIRTUAL
=========== =======
Kernel Alloc Once 4K
MALLOC 10.9M
MALLOC (admin) 16K
STACK GUARD 56.0M
Stack 8192K
VM_ALLOCATE 8K
__DATA 1748K
__LINKEDIT 71.4M
__TEXT 13.8M
__UNICODE 552K
shared memory 4K
=========== =======
TOTAL 162.3M
Model: MacBookPro12,1, BootROM MBP121.0167.B02, 2 processors, Intel Core i5, 2.7 GHz, 8 GB, SMC 2.28f6
Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54414C41522D4E5544
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54414C41522D4E5544
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.15.166.24.3)
Bluetooth: Version 4.3.4f4 15601, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0256G, 251 GB
USB Device: Internal Memory Card Reader
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1
答案 0 :(得分:2)
如果您在brew install python
安装python之前安装了vim / macvim和插件YCM,则可以重新安装YCM来解决该问题。它对我有用。
答案 1 :(得分:0)
如果您使用的是YouCompleteMe插件,请将以下内容放入〜/ .vimrc中。
let g:ycm_path_to_python_interpreter = "/usr/local/bin/python"
答案 2 :(得分:0)
我正在使用YouCompleteMe,并在从自制程序安装python之后开始使用我的官方MacVim构建。将此添加到我的~/.vimrc
为我修复了它:
let g:ycm_path_to_python_interpreter = "/usr/bin/python"