No module named objc

六月ゝ 毕业季﹏ 提交于 2019-12-10 13:45:09

问题


I'm trying to use cocoa-python with Xcode but it always calls up the error:

Traceback (most recent call last):
  File "main.py", line 10, in <module>
    import objc
ImportError: No module named objc

This seems to be because dispite all my attempts to install or find objc and the other modules used by that file, they are simply not on my computer that I can tell, so does anyone know where I can download the actual files (or could put up their own copies?) as in objc.py, Foundation.py, AppKit.py and PyObjCTools.py?


回答1:


In MacOSX put on console:

pip install -U pyobjc




回答2:


http://pyobjc.sourceforge.net/ is the homepage of the whole PyObjC project, so if for some reason it isn't installed along OS X, you can always download it from there.



来源:https://stackoverflow.com/questions/4678186/no-module-named-objc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!