关于Psychopy中AppKit模块的ImportError

时间:2016-04-24 22:29:19

标签: python-2.7 appkit pyobjc psychopy

我最近将PyObjC下载到我的Mac OS X El Capitan版本10.11.3,以便我可以在PsychoPy中导入AppKit模块。当我尝试运行我的脚本时,我收到以下错误:

Traceback (most recent call last):
  File "/Users/Dustin/Desktop/CMNT/CMNT.psychopy.py", line 8, in <module>
    from AppKit import NSScreen
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/AppKit/__init__.py", 
line 8, in <module>
import objc
  File     "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/objc/__init__.py",     line 32, in <module>
from objc._bridgesupport import *
  File         "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/objc/
_bridgesupport.py", line 13, in <module>
    import pkg_resources
  File "pkg_resources/__init__.pyc", line 75, in <module>
  File "pkg_resources/extern/__init__.pyc", line 60, in load_module
ImportError: The 'packaging' package is required; normally this is bundled with this 
package so if you get this warning, consult the packager of your distribution.

我在网上看到将版本工具降级到版本19.2会有所帮助,所以我这样做但是仍然在PsychoPy中遇到同样的错误。是否有其他方法来解决此错误或我做错了什么?

编辑: 以下是我收到的完整错误消息:

var newArray = categories.map(function(item) {
  return {id: id, cetegory: item}
});

0 个答案:

没有答案