Python PyObjC_IdToPython(@protocol(NSURLSessionStreamDelegate))错误
作者:互联网
当我尝试安装pyobjc-framework-Cocoa我看到这个错误:
In file included from Modules/_Foundation.m:15:
Modules/_Foundation_protocols.m:14:28: error: cannot find protocol declaration for 'NSProgressReporting'
p = PyObjC_IdToPython(@protocol(NSProgressReporting)); Py_XDECREF(p);
^
Modules/_Foundation_protocols.m:15:28: error: cannot find protocol declaration for 'NSURLSessionStreamDelegate'
p = PyObjC_IdToPython(@protocol(NSURLSessionStreamDelegate)); Py_XDECREF(p);
^
2 errors generated.
error: command '/usr/bin/clang' failed with exit status 1
解决方法:
我能够在以下环境中避免此问题:
Mac OS X 10.10.5
pip8.1.2
python3.4
请尝试以下命令.
pip uninstall pyobjc-core
pip install pyobjc==3.0.4
问题的原因似乎是“pyobjc-core3.1.1”的交付错误.
如果在3.0.4中统一,它应该顺利.
干杯!
标签:python,protocols,pyobjc 来源: https://codeday.me/bug/20190623/1268842.html