将我的OS X升级为mac sierra广告更新了macport({'priority': 'lo', 'date': '2017-03-29', 'description': 'description details', 'name': 'firstname lastname'}
{'priority': 'lo', 'date': '2017 June 29', 'description': 'description details', 'name': 'firstname lastname'}
)。然后尝试从终端运行python并每次都收到此错误:
sudo port selfupdate
我安装了Python 3.6.2 (default, Jul 18 2017, 14:08:57)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Python(1316,0x7fffee2213c0) malloc: *** error for object 0x105b21698: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
,但没有帮助。现在该怎么解决?
我在GitHub上发现了这个:Crashes with Python 3.6 - MacOS Sierra,但没有帮助。
答案 0 :(得分:0)
我找到了解决方案!
Irmen de Jong中comment指出的macport问题。安装py36-readline
无法解决问题,因为它在安装python36
##############################################################
# IF YOU ARE USING PYTHON FROM THE TERMINAL, PLEASE INSTALL:
# py36-readline
# TO AVOID A LIBEDIT / PYTHON INTERACTION ISSUE.
# REF: https://trac.macports.org/ticket/48807
##############################################################
解决方案在REF链接处提供 执行以下操作:
sudo port uninstall python36
sudo port uninstall py36-readline
sudo port install python36 +readline
这将解决错误。