【发布时间】:2018-03-23 08:58:36
【问题描述】:
我正在尝试从 Google App Engine 运行一个网络应用程序,该应用程序使用 pandas-gbq 访问 bigquery。这是我构建和运行应用程序时的错误:
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: No module named numpy.core.multiarray
我的 requirements.txt 文件有
google-api-python-client==1.6.5
google-auth==1.4.1
google-auth-httplib2==0.0.3
numpy==1.14.2
pandas==0.22.0
pandas-gbq==0.3.1
最后 3 个版本的这些版本可以在标准 Python 脚本中的 Web 应用程序之外正常工作。也许这与应用引擎没有使用上面指定的 numpy 版本有关,而是使用内置版本 1.6.1:https://cloud.google.com/appengine/docs/standard/python/tools/built-in-libraries-27
关于如何解决此问题的任何提示?
【问题讨论】:
-
GAE标准环境下无法上传编译好的C代码,numpy有编译好的代码。
标签: python numpy google-app-engine google-bigquery