Python PyObjC_IdToPython (@protocol (NSURLSessionStreamDelegate) error)

when I try to install pyobjc-framework- Cocoa, I see this error:

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
+4
source share
1 answer

I managed to avoid the problem in the following environment:

Mac OS X 10.10.5  
pip8.1.2  
python3.4  

Try the following command.

pip remove pyobjc-core
pip install pyobjc == 3.0.4

The cause of the problem is the delivery error "pyobjc-core3.1.1".
It should go well if unified in 3.0.4.

Hooray!

+4
source

All Articles