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. WORLD F4快捷重复上一步操作

    只需做一次动作,后面就直接按F4即可重复上一次操作.

  2. xshell工具source导入几个G的数据库

    直奔主题 xshell工具source导入几个G的数据库 1.先把sql文件通过ftp或者winscp上传到服务器对应站点根目录,如图所示 2.进入xshell界面,进入数据库之前一定设定编码,否者会 ...

  3. IIS服务器被配置为不列出此目录的内容

    使用 IIS 管理器启用目录浏览. 打开 IIS 管理器. 在“功能”视图中,双击“目录浏览”. 在“目录浏览”页上,在“操作”窗格中单击“启用”.

  4. module.js:549 throw err;

    解决方法: 1.有可能是拼写错误 2.未明原因. (1)删除 node_modules 文件夹 (2)cnpm cache clean,不过提示错误就用 cnpm cache clean --forc ...

  5. Salesforce 导入导出数据简介

    导入数据的方式 有两种方式可以将数据导入Salesforce: 数据导入向导 Data Loader工具 Salesforce支持将csv文件中的数据导入系统. 数据导入向导 数据导入向导可以从设置界 ...

  6. Android为TV端助力 关于Fragment你所需知道的一切!

    转载自刘明渊 的博客地址:http://blog.csdn.net/vanpersie_9987 Fragment 是 Android API 中的一个类,它代表Activity中的一部分界面:您可以 ...

  7. Linux 中如何避免 rm -rf /*

    Linux 的删除命令中 rm中没有回收站的概念,一旦文件被删除比较难还原.更可怕的是rm -rf /*,连自己都能删 这命令太危险了,弄错了就核爆了,带来的损失的巨大的.比如 Gitlab.com ...

  8. MySQL 约束、表连接、表关联、索引

    一.外键: 1.什么是外键 2.外键语法 3.外键的条件 4.添加外键 5.删除外键 1.什么是外键: 主键:是唯一标识一条记录,不能有重复的,不允许为空,用来保证数据完整性. 外键:是另一表的唯一性 ...

  9. 个人项目:Java实现WC

    Java实现WC Github项目地址:https://github.com/auxshaw/WC 项目要求 wc.exe 是一个常见的工具,它能统计文本文件的字符数.单词数和行数.这个项目要求写一个 ...

  10. ZooKeeper使用命令大全

    stat path [watch]    set path data [version]    ls path [watch]    delquota [-n|-b] path    ls2 path ...