使用macport安装的Python 3.6.2在终端使用时发生崩溃

时间:2017-08-21 21:25:12

标签: python macports python-3.6

将我的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,但没有帮助。

1 个答案:

答案 0 :(得分:0)

我找到了解决方案! Irmen de Jongcomment指出的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链接处提供 执行以下操作:

  • 删除python36:sudo port uninstall python36
  • 删除py36-readline:sudo port uninstall py36-readline
  • 使用sudo port install python36 +readline
  • 安装python36

这将解决错误。