PyCharm IDE: boto 已经安装但是出现 "No module named boto.cloudfront" importError

PyCharm IDE: boto is already installed but got a "No module named boto.cloudfront" importError

我已经在我的 python 虚拟环境中安装了 boto,如我的 pycharm 项目的屏幕截图所示。

但是当我 运行 我的脚本来自 pycharm

时,我得到了 boto.cloudfront 的 ImportError
ERROR    2015-04-20 00:17:39,590 wsgi.py:263] 
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
    handler, path, err = LoadObject(self._handler)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
    obj = __import__(path[0])
  File "/Users/antkong/dev/test/testmain.py", line 7, in <module>
    from boto.cloudfront import CloudFrontConnection
ImportError: No module named boto.cloudfront

在 python 控制台中,我可以很好地导入库:

有什么地方可能出错的建议吗?

我的项目是 Google App Engine 项目。因此,即使 boto 安装在本地,我的 Google App Engine 项目

中的代码也看不到它

我的解决方案是将 boto 和所有依赖项复制到 lib 子目录中,然后将其添加到 sys.path