mac 10.14/ conda/python 3.7环境下运行神经网络例子出现错误:

-- ::55.982 python[:] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fd5a5811270
-- ::55.988 python[:] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fd5a5811270'
*** First throw call stack:
(
CoreFoundation 0x00007fff3c94643d __exceptionPreprocess +
libobjc.A.dylib 0x00007fff68853720 objc_exception_throw +
CoreFoundation 0x00007fff3c9c3255 -[NSObject(NSObject) __retain_OA] +
CoreFoundation 0x00007fff3c8e5ad0 ___forwarding___ +
CoreFoundation 0x00007fff3c8e5478 _CF_forwarding_prep_0 +
libtk8..dylib 0x00000001334ee31d TkpInit +
libtk8..dylib 0x000000013344617e Initialize +
_tkinter.cpython-37m-darwin.so 0x000000010727aa0f _tkinter_create +
python 0x0000000105b028b6 _PyMethodDef_RawFastCallKeywords +
python 0x0000000105c3fba2 call_function +
python 0x0000000105c3d852 _PyEval_EvalFrameDefault +
python 0x0000000105c311fe _PyEval_EvalCodeWithName +
python 0x0000000105b01587 _PyFunction_FastCallDict +
python 0x0000000105b83c31 slot_tp_init +
python 0x0000000105b8dc01 type_call +
python 0x0000000105b02283 _PyObject_FastCallKeywords +
python 0x0000000105c3fc35 call_function +
python 0x0000000105c3d946 _PyEval_EvalFrameDefault +
python 0x0000000105b02075 function_code_fastcall +
python 0x0000000105c3fb27 call_function +
python 0x0000000105c3d852 _PyEval_EvalFrameDefault +
python 0x0000000105c311fe _PyEval_EvalCodeWithName +
python 0x0000000105b01587 _PyFunction_FastCallDict +
python 0x0000000105b054a2 method_call +
python 0x0000000105b02ef2 PyObject_Call +
python 0x0000000105c3da9d _PyEval_EvalFrameDefault +
python 0x0000000105c311fe _PyEval_EvalCodeWithName +
python 0x0000000105b02783 _PyFunction_FastCallKeywords +
python 0x0000000105c3fb27 call_function +
python 0x0000000105c3d88d _PyEval_EvalFrameDefault +
python 0x0000000105b02075 function_code_fastcall +
python 0x0000000105c3fb27 call_function +
python 0x0000000105c3d88d _PyEval_EvalFrameDefault +
python 0x0000000105c311fe _PyEval_EvalCodeWithName +
python 0x0000000105b02783 _PyFunction_FastCallKeywords +
python 0x0000000105c3fb27 call_function +
python 0x0000000105c3d88d _PyEval_EvalFrameDefault +
python 0x0000000105c311fe _PyEval_EvalCodeWithName +
python 0x0000000105b02783 _PyFunction_FastCallKeywords +
python 0x0000000105c3fb27 call_function +
python 0x0000000105c3d852 _PyEval_EvalFrameDefault +
python 0x0000000105b02075 function_code_fastcall +
python 0x0000000105c3fb27 call_function +
python 0x0000000105c3d88d _PyEval_EvalFrameDefault +
python 0x0000000105c311fe _PyEval_EvalCodeWithName +
python 0x0000000105c94760 PyRun_FileExFlags +
python 0x0000000105c93bd7 PyRun_SimpleFileExFlags +
python 0x0000000105cc17bf pymain_main +
python 0x0000000105ad4bbd main +
libdyld.dylib 0x00007fff69921085 start +
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap:

解决办法,运行下面的命令:

$ mkdir -p ~/.matplotlib
$ echo "backend: TkAgg" > ~/.matplotlib/matplotlibrc

然后就成功了

具体原因可见:https://github.com/PAHdb/AmesPAHdbPythonSuite/issues/1

mac python3 conda pytorch出错:libc++abi.dylib: terminating with uncaught exception of type NSException的更多相关文章

  1. IOS Exception 1(libc++abi.dylib: terminating with uncaught exception of type NSException)

    2014-08-05 22:18:46.455 SwiftUI[1329:40871] -[_TtC7SwiftUI14MViewControler clickMe]: unrecognized se ...

  2. 新浪微博分享出现libc++abi.dylib: terminating with uncaught exception of type NSException微博微信SDK运行编译报错

    SDK出现libc++abi.dylib: terminating with uncaught exception of type NSException  的问题: 解决方法 结合 # 监测bug( ...

  3. libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

    In Xcode 9 and Swift 4: Print exception stack to know the reason of the exception: Go to show break ...

  4. libc++abi.dylib: terminating with uncaught exception of type NSException

    这是微信sdk注册时候报的错误 解决方法 选择Build Setting,在"Other Linker Flags"中加入"-Objc -all_load"

  5. 如何调试libc++abi.dylib handler threw exception错误

    From:http://blog.csdn.net/naruto_ku/article/details/8779203 在进行iOS开发时,偶尔会碰到libc++abi.dylib handler t ...

  6. iOS - libc++abi.dylib: terminate_handler unexpectedly threw an exception

    代码出现crash,报错:libc++abi.dylib: terminate_handler unexpectedly threw an exception 当我们很明确是某一块代码执行导致了错误, ...

  7. libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结

    说法一: 我们在运行xcode工程时,有时候会遇到”libc++abi.dylib: terminate_handler unexpectedly threw an exception”错误,app莫 ...

  8. libc++abi.dylib handler threw exception

    在iOS开发时,有时候遇到libc++abi.dylib handler threw exception这样的异常,  虽然在断点出加上了All Exceptions,也断到相应的代码了,但是没打印对 ...

  9. 综合出现NSScanner: nil string argument libc++abi.dylib: terminat错误的解决方案

    在开发中出现了这个错误,断点查找很久,没找到问题所在的代码,google下,发现了下面这几点会产生这个错误: 首先,顾名思义,错误原因是我们在调用某个方法的时候,传入了一个空字符串(注意区别于字符串内 ...

随机推荐

  1. linux开启新端口

    1.使用vi或者vim打开iptables配置文件: vi /etc/sysconfig/iptables 2.在编辑页面新增加信任端口: -A INPUT -m state --state NEW ...

  2. angular $index获取ng-repeat的上一条数据

    <div ng-repeat="item in dataList" ng-click="func($index,$index-1)"></di ...

  3. angularJs - cynthia娆墨旧染-响应式文章发布系统

    (0)功能 a.添加新文章 b.修改已发布文章 c.搜索已经发布的文章 d.demo链接:   http://cynthiawupore.github.io/angularJS (1)界面 a.文章列 ...

  4. [HTML/CSS]浮动的那点事儿

    元素是怎样浮动 元素的水平方向浮动,意味着元素只能左右移动而不能上下移动. 一个浮动元素会尽量向左或向右移动,直到它的外边缘碰到包含框或另一个浮动框的边框为止. 浮动元素之后的元素将围绕它. 浮动元素 ...

  5. 19.Odoo产品分析 (二) – 商业板块(11) – 在线活动(1)

    查看Odoo产品分析系列--目录 点击安装"在线活动". 1. 主页 在线活动绑定在电子商务中,在网站中可以看到在线活动的菜单:  在这里可以按时间看到每一个活动. 2. 新建活动 ...

  6. Android为TV端助力 很详细的序列化过程Parcelable

    直接上代码:注释都写的很清楚了. public class Entry implements Parcelable{ public int userID; public String username ...

  7. windows虚拟内存机制

    在windows系统中个,每个进程拥有自己独立的虚拟地址空间(Virtual Address Space).这一地址空间的大小与计算机硬件.操作系统以及应用程序都有关系. 对于32位程序来说,最多能使 ...

  8. C# 混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集

    1.在项目解决方案中,找到项目的app.config文件

  9. java一个数分解的质因数java

    import java.util.Scanner; /** * Created by Admin on 2017/3/18. */ public class Test01 { public stati ...

  10. linux卸载openjdk

    本来不想写的网上的东西罗嗦死了 sudo apt-get purge openjdk*