2016-09-17 62 views
0

我是PyCharm的新手,正在尝试构建/部署一个简单的应用程序到AppEngine。我去了PyCharm - > Preferences,点击Project Interpreter,并安装了google-api-python-client,其中包含googleapiclient。然而,当我运行这个程序并加载网页,它死在这条线:PyCharm ImportError:没有名为googleapiclient的模块

from googleapiclient import discovery 

与此错误:

ImportError: No module named googleapiclient 

我已经下降到PyCharm的CLI解释并运行相同的命令,其中它运行良好,只有在运行时才会失败。

看过其他人都有同样的问题,所有的解决方案都谈论在我已经完成的项目解释器中安装包,但它仍然失败。任何帮助表示赞赏。

回答

1

从客户端库的Installation instructions

For information on installing the source for the library into your App Engine project, see the App Engine specific installation instructions .

其中规定:

Because the Python client libraries are not installed in the App Engine Python runtime environment , they must be vendored into your application just like third-party libraries.

这些指令的作用是使应用程序本身自成一体,并保持开发服务器高兴 - 他们做不知道(也不需要知道)如何读取pycharm configs来运行代码。

+0

谢谢,您在图书馆的供应商链接帮助。我知道这些库需要上传,但不知道如何。这样做:) – Michael

相关问题