我在使用python时遇到问题,想知道我是否使用了错误的版本。
我正在尝试使用nupic-stuido(https://github.com/nupic-community/nupic.studio/wiki/Installing-and-Building)
安装工作正常但是当我尝试运行它时,我得到了
$ python program.py
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
找到了类似的问题
但我解决方案不起作用或者我不能正确理解它们。
Mac os x还会显示错误窗口,其中包含以下内容 (我只放了上半部分,因为我不知道如何使这篇文章的篇幅超过30000):
Process: Python [524]
Path: /Library/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: bash [310]
Responsible: Terminal [233]
User ID: 501
Date/Time: 2015-12-07 13:20:55.133 +0100
OS Version: Mac OS X 10.11 (15A284)
Report Version: 11
Anonymous UUID: C6665704-A59C-4BB9-3694-A149FF9BCD29
Sleep/Wake UUID: 6DE48D71-EFF8-4C4C-A0B0-53BBBED062A5
Time Awake Since Boot: 3500 seconds
Time Since Wake: 2200 seconds
System Integrity Protection: enabled
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 0x00007fff94bec0ae __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff9614e500 pthread_kill + 90
2 libsystem_c.dylib 0x00007fff9b6be37b abort + 129
3 org.python.python 0x000000010865fce2 Py_FatalError + 49
4 org.python.python 0x000000010865f1f0 PyThreadState_Get + 28
5 org.python.python 0x000000010865c03a Py_InitModule4_64 + 62
6 _math.so 0x0000000109012fb0 init_math + 864 (math_wrap.cxx:140036)
7 org.python.python 0x00000001000deba1 _PyImport_LoadDynamicModule + 177
8 org.python.python 0x00000001000dcc58 imp_load_module + 184
9 org.python.python 0x00000001000c357d PyEval_EvalFrameEx + 24829
10 org.python.python 0x00000001000c467e PyEval_EvalFrameEx + 29182
11 org.python.python 0x00000001000c58e3 PyEval_EvalCodeEx + 2115
12 org.python.python 0x00000001000c5a06 PyEval_EvalCode + 54
13 org.python.python 0x00000001000da0a0 PyImport_ExecCodeModuleEx + 208
14 org.python.python 0x00000001000db2a2 load_source_module + 626
15 org.python.python 0x00000001000dd28b import_submodule + 315
16 org.python.python 0x00000001000dd73a load_next + 234
17 org.python.python 0x00000001000dda7c PyImport_ImportModuleLevel + 412
18 org.python.python 0x00000001000bafe3 builtin___import__ + 131
19 org.python.python 0x000000010000c612 PyObject_Call + 98
20 org.python.python 0x00000001000bc1c7 PyEval_CallObjectWithKeywords + 87
21 org.python.python 0x00000001000c0432 PyEval_EvalFrameEx + 12210
22 org.python.python 0x00000001000c58e3 PyEval_EvalCodeEx + 2115
23 org.python.python 0x00000001000c5a06 PyEval_EvalCode + 54
24 org.python.python 0x00000001000da0a0 PyImport_ExecCodeModuleEx + 208
25 org.python.python 0x00000001000db2a2 load_source_module + 626
26 org.python.python 0x00000001000dd28b import_submodule + 315
27 org.python.python 0x00000001000dd73a load_next + 234
28 org.python.python 0x00000001000dda7c PyImport_ImportModuleLevel + 412
29 org.python.python 0x00000001000bafe3 builtin___import__ + 131
30 org.python.python 0x000000010000c612 PyObject_Call + 98
31 org.python.python 0x00000001000bc1c7 PyEval_CallObjectWithKeywords + 87
32 org.python.python 0x00000001000c0432 PyEval_EvalFrameEx + 12210
33 org.python.python 0x00000001000c58e3 PyEval_EvalCodeEx + 2115
34 org.python.python 0x00000001000c5a06 PyEval_EvalCode + 54
35 org.python.python 0x00000001000da0a0 PyImport_ExecCodeModuleEx + 208
36 org.python.python 0x00000001000db2a2 load_source_module + 626
37 org.python.python 0x00000001000dd28b import_submodule + 315
38 org.python.python 0x00000001000dd73a load_next + 234
39 org.python.python 0x00000001000dda7c PyImport_ImportModuleLevel + 412
40 org.python.python 0x00000001000bafe3 builtin___import__ + 131
41 org.python.python 0x000000010000c612 PyObject_Call + 98
42 org.python.python 0x00000001000bc1c7 PyEval_CallObjectWithKeywords + 87
43 org.python.python 0x00000001000c0432 PyEval_EvalFrameEx + 12210
44 org.python.python 0x00000001000c58e3 PyEval_EvalCodeEx + 2115
45 org.python.python 0x00000001000c5a06 PyEval_EvalCode + 54
46 org.python.python 0x00000001000da0a0 PyImport_ExecCodeModuleEx + 208
47 org.python.python 0x00000001000db2a2 load_source_module + 626
48 org.python.python 0x00000001000dd28b import_submodule + 315
49 org.python.python 0x00000001000dd73a load_next + 234
50 org.python.python 0x00000001000dda7c PyImport_ImportModuleLevel + 412
51 org.python.python 0x00000001000bafe3 builtin___import__ + 131
52 org.python.python 0x000000010000c612 PyObject_Call + 98
53 org.python.python 0x00000001000bc1c7 PyEval_CallObjectWithKeywords + 87
54 org.python.python 0x00000001000c0432 PyEval_EvalFrameEx + 12210
55 org.python.python 0x00000001000c58e3 PyEval_EvalCodeEx + 2115
56 org.python.python 0x00000001000c5a06 PyEval_EvalCode + 54
57 org.python.python 0x00000001000ea41e PyRun_FileExFlags + 174
58 org.python.python 0x00000001000ea6ba PyRun_SimpleFileExFlags + 458
59 org.python.python 0x000000010010187d Py_Main + 3101
60 org.python.python 0x0000000100000f14 0x100000000 + 3860
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff5fbfd288 rdx: 0x0000000000000000
rdi: 0x0000000000000a0b rsi: 0x0000000000000006 rbp: 0x00007fff5fbfd2b0 rsp: 0x00007fff5fbfd288
r8: 0x0000000000000040 r9: 0x00007fff7d52f1e0 r10: 0x0000000008000000 r11: 0x0000000000000206
r12: 0x0000000000000000 r13: 0x0000000109294edd r14: 0x00007fff7c919000 r15: 0x0000000108595ec4
rip: 0x00007fff94bec0ae rfl: 0x0000000000000206 cr2: 0x00007fff7d52d038
Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133
Binary Images:
0x100000000 - 0x100000fff +org.python.python (2.7.10 - 2.7.10) <DA2FF3FB-F70D-A899-1829-4F86802713E0> /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
0x100003000 - 0x100170fff +org.python.python (2.7.10, [c] 2001-2015 Python Software Foundation. - 2.7.10) <5E0C1150-83D5-6364-A820-E7AD67962D79> /Library/Frameworks/Python.framework/Versions/2.7/Python
0x1002f2000 - 0x1002f4ff7 +_locale.so (???) <3C1429AD-B0EF-96BF-9E7E-2F7B48975B36> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
0x1002f8000 - 0x1002faff7 +time.so (???) <27C9305F-C19D-5993-A8E3-109D23D2CEAF> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so
0x1006f0000 - 0x1006f1fff +Qt.so (0) <0CDDDCAF-D49F-3785-B0AB-83F2F9BA47FE> /usr/local/lib/python2.7/site-packages/PyQt4/Qt.so
0x1006f6000 - 0x1006fafff +QtScriptTools.so (0) <EE25367B-D961-3ABE-B203-4FC901F94C9B> /usr/local/lib/python2.7/site-packages/PyQt4/QtScriptTools.so
0x102040000 - 0x102195fff +QtCore.so (0) <A24A93D3-6921-3D47-B04D-8591027169E7> /usr/local/lib/python2.7/site-packages/PyQt4/QtCore.so
0x1022c3000 - 0x102535ff7 +QtCore (4.8.7) <397897E8-4748-3AB8-AC32-BE3A8AB6CA01> /usr/local/lib/QtCore.framework/Versions/4/QtCore
0x10260e000 - 0x102620ff7 +sip.so (0) <BAA7E0C2-97F9-3913-AB16-15E14A902F56> /usr/local/lib/python2.7/site-packages/sip.so
0x10266b000 - 0x102a97ff7 +QtGui.so (0) <0C43EEAC-C4D1-389A-96AE-5BF7340F97A6> /usr/local/lib/python2.7/site-packages/PyQt4/QtGui.so
0x102ea6000 - 0x103756ff7 +QtGui (4.8.7) <93E471BC-B6E3-31B3-A785-C59AC696F487> /usr/local/lib/QtGui.framework/Versions/4/QtGui
0x103ade000 - 0x103aeeff7 +QtHelp.so (0) <503CDFB8-CCD6-3974-85E0-903D830E89EB> /usr/local/lib/python2.7/site-packages/PyQt4/QtHelp.so
0x103d00000 - 0x103d6aff7 +QtHelp (4.8.7) <3D67E098-999B-3B49-BBC7-3B7E08DAD145> /usr/local/lib/QtHelp.framework/Versions/4/QtHelp
0x103d9c000 - 0x103dcafff +QtSql (4.8.7) <BAAF9391-BF08-3D87-84EB-AB09563278AC> /usr/local/lib/QtSql.framework/Versions/4/QtSql
0x103de2000 - 0x103eeefff +QtNetwork (4.8.7) <DFE22C8A-0763-394E-A0BF-6C245C5F4CD6> /usr/local/lib/QtNetwork.framework/Versions/4/QtNetwork
0x103f57000 - 0x10401cfff +libQtCLucene.4.dylib (4.8.7) <640AAC2D-AB7B-3862-BBF8-AF7724C6AC08> /usr/local/Cellar/qt/4.8.7_1/lib/libQtCLucene.4.dylib
0x1040b4000 - 0x1040f2fff +libssl.1.0.0.dylib (0) <312310DF-DD1F-3745-B961-B8E330675727> /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
0x10410e000 - 0x1042618f7 +libcrypto.1.0.0.dylib (0) <67ACAF3D-E894-37E9-9756-A017837B8E96> /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
0x1042d8000 - 0x1042ebff7 +QtMultimedia.so (0) <2F7309FC-6A82-3AE1-B280-FEC89C60A9FF> /usr/local/lib/python2.7/site-packages/PyQt4/QtMultimedia.so
0x104300000 - 0x104321fff +QtMultimedia (4.8.7) <DC480305-F13B-3C2A-94AF-FEE08A3492B2> /usr/local/lib/QtMultimedia.framework/Versions/4/QtMultimedia
0x104336000 - 0x104383fff +QtNetwork.so (0) <D12CC346-21E6-3071-A56C-A68020150D84> /usr/local/lib/python2.7/site-packages/PyQt4/QtNetwork.so
0x1043d2000 - 0x1043f4ff7 +QtDeclarative.so (0) <AEF0D93F-7ABE-3231-A390-635FCB6B09DF> /usr/local/lib/python2.7/site-packages/PyQt4/QtDeclarative.so
0x10441f000 - 0x104709ff7 +QtDeclarative (4.8.7) <7B2A4763-30AE-30FE-A9B1-3BDF0D4FB904> /usr/local/lib/QtDeclarative.framework/Versions/4/QtDeclarative
0x10487b000 - 0x104a25ff7 +QtScript (4.8.7) <F9FFD0D5-F002-38B6-B4DE-C2D8E59E7CF1> /usr/local/lib/QtScript.framework/Versions/4/QtScript
0x104ae2000 - 0x104b27fff +QtSvg (4.8.7) <B9F04A73-A98D-3873-B242-D61D206930CE> /usr/local/lib/QtSvg.framework/Versions/4/QtSvg
0x104b49000 - 0x104f5dfff +QtXmlPatterns (4.8.7) <8ED9E9C2-2632-3168-A48A-25D991AFB425> /usr/local/lib/QtXmlPatterns.framework/Versions/4/QtXmlPatterns
0x1050c1000 - 0x1050dcff7 +QtScript.so (0) <E3278B5D-F0C0-3261-93E5-0C9C34EC6477> /usr/local/lib/python2.7/site-packages/PyQt4/QtScript.so
0x1050f9000 - 0x105195ff7 +QtScriptTools (4.8.7) <25E26CDA-527B-361A-9E35-45A15EEDE788> /usr/local/lib/QtScriptTools.framework/Versions/4/QtScriptTools
0x1051f1000 - 0x10521cfff +QtXml.so (0) <5582F952-9876-3513-B10C-F8DCCB9A2D94> /usr/local/lib/python2.7/site-packages/PyQt4/QtXml.so
0x105248000 - 0x105280fff +QtXml (4.8.7) <12652AE2-AA48-3FD4-9CCC-C93EEB13ED5B> /usr/local/lib/QtXml.framework/Versions/4/QtXml
0x10529b000 - 0x1052c0ff7 +QtOpenGL.so (0) <737C3827-9A44-34F2-B89E-7A49ED551C5E> /usr/local/lib/python2.7/site-packages/PyQt4/QtOpenGL.so
0x1052e8000 - 0x1053acfff +QtOpenGL (4.8.7) <AFB0CF59-6C01-3481-87D9-F34AA7D9D229> /usr/local/lib/QtOpenGL.framework/Versions/4/QtOpenGL
0x1053f4000 - 0x1053f8fff com.apple.agl (3.3.1 - AGL-3.3.1) <4DBEAB05-DDCD-3CD4-8046-C29852B56EB5> /System/Library/Frameworks/AGL.framework/Versions/A/AGL
0x105440000 - 0x10546afff +QtSql.so (0) <AD82BAEE-C173-3F36-9A05-D09366096D90> /usr/local/lib/python2.7/site-packages/PyQt4/QtSql.so
0x105496000 - 0x1054a3ff7 +QtSvg.so (0) <C9D11F5A-61CB-3613-8C8E-E21D16931393> /usr/local/lib/python2.7/site-packages/PyQt4/QtSvg.so
0x1054b4000 - 0x1054baff7 +QtTest.so (0) <AA81CA5F-1F41-32C0-9A8A-E0DA4C99CDE2> /usr/local/lib/python2.7/site-packages/PyQt4/QtTest.so
0x1054c0000 - 0x1054defff +QtTest (4.8.7) <F39C35D7-A2A9-366B-98E9-86A243EDF29A> /usr/local/lib/QtTest.framework/Versions/4/QtTest
0x1054ef000 - 0x10552bff7 +QtWebKit.so (0) <1F1A10C1-7BFB-3FA8-9E14-0A403B24E6E7> /usr/local/lib/python2.7/site-packages/PyQt4/QtWebKit.so
0x105569000 - 0x106836fff +QtWebKit (4.9.4) <4A330FBC-4599-34DD-8DF6-C0A1C900438C> /usr/local/lib/QtWebKit.framework/Versions/4/QtWebKit
0x1070cc000 - 0x1070e2fff +QtXmlPatterns.so (0) <1A8FA7C3-06E8-3AE9-92C6-C0DE01C2D476> /usr/local/lib/python2.7/site-packages/PyQt4/QtXmlPatterns.so
0x1070fc000 - 0x10712bfff +QtDesigner.so (0) <8C00362B-AB70-3329-B51F-51EF2EEE6FEC> /usr/local/lib/python2.7/site-packages/PyQt4/QtDesigner.so
0x107162000 - 0x1075e7ff7 +QtDesigner (4.8.7) <5138F994-3DB0-3A8A-A026-B6383987A92D> /usr/local/lib/QtDesigner.framework/Versions/4/QtDesigner
如果我在.dylib文件上使用otool -L,我该怎么办?例如:
$ otool -L /usr/lib/system/libsystem_kernel.dylib
/usr/lib/system/libsystem_kernel.dylib:
/usr/lib/system/libsystem_kernel.dylib (compatibility version 1.0.0, current version 3247.1.106)
我现在用install_name_tool做什么?
我也尝试了
port select python
并收到错误:
aps-MacBook-Pro:bin ap$ port select python
Warning: Unable to get active selected version: The specified group 'python' does not exist.
Error: The 'list' command failed: The specified group 'python' does not exist.
另外 “sudo port select --list python”和 “sudo port select python” 不起作用。
我使用的是python2.7
$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
有人有想法吗?
答案 0 :(得分:0)
我们知道此问题,请参阅:https://github.com/numenta/nupic/issues/1813。此时唯一的解决方法是compile from source code。
答案 1 :(得分:0)
尝试了许多解决方案符号链接,tkinter等之后。在我的案例中,这与使用旧依赖关系的pyopenssl有关。您可以通过删除加密软件包并对其进行升级来对其进行修复。
pip3 install --upgrade cryptography