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. 消息队列redis

    1.消息队列流程 2.接收用户请求 <?php header("Content-type:text/html;charset=utf-8"); //首先加载redis组键 $ ...

  2. 洛谷P4592 [TJOI2018]异或(可持久化01Trie)

    题意 题目链接 可持久化01Trie板子题 对于两个操作分别开就行了 #include<bits/stdc++.h> using namespace std; const int MAXN ...

  3. JMeter 关于JMeter 正则表达式提取器的一点研究

    关于JMeter 正则表达式提取器的一点研究   by:授客 QQ:1033553122 1.   实验环境: JMeter 2.13 2.   添加正则表达式提取器 右键线程组->添加-> ...

  4. Java synchronized解析

    多线程三大特性: 可见性.原子性.有序性 synchronize的特性: 1.同一时刻只有一个线程访问临界资源 2.其它未获取到锁执行权的线程必须排队等待 3.保证共享资源的原子性.可见性和有序性 4 ...

  5. (其他)用sublime text3编写的html网页用浏览器打开出现中文乱码的原理及解决方法(转)

    最近发现Hbuler比较难用,换成sublime text3了,用了以前没用过的软件,就要学习他的操作,刚上手就出了点问题. 解决方法就是sublime text3以utf8 with bom保存. ...

  6. (jQuery插件)autocomplete插件的简单例子

    1.引入相应的js和css,我用到的时候是在jquery-ui的js里面整合的,ui的css 2.先在html上写一个input <input id="tags" class ...

  7. MongoDB 安装与配置

    MongoDB下载 官方下载链接:https://www.mongodb.com/download-center/community MongoDB安装 简单,按提示安装即可.安装方式: 1. Com ...

  8. AIOps 平台的误解,挑战及建议(下)— AIOps 挑战及建议

    本文篇幅较长,分为上,中,下,三个部分进行连载.内容分别为:AIOps 背景/所应具备技术能力分析(上),AIOps 常见的误解(中),挑战及建议(下). 前言 我大概是 5,6 年前开始接触 ITO ...

  9. C#-事件(十八)

    概述 事件(Event) 基本上说是一个用户操作,如按键.点击.鼠标移动 使用事件,可以很方便地确定程序执行顺序 事件在类中声明且生成,且通过使用同一个类或其他类中的委托与事件处理程序关联 包含事件的 ...

  10. AspNet mvc的一个bug

    [HttpPost] public ActionResult updateLoan(TuWenMilitaryRank entity) 使用mvc绑定表单 每次绑定的对象都为null,查看Reques ...