【问题标题】:Installing QuantLib python SWIG module on Google app engine在 Google 应用引擎上安装 QuantLib python SWIG 模块
【发布时间】:2013-03-31 05:02:56
【问题描述】:

我是 GAE 的新手。我希望使用 QuantLib python 库(SWIG)作为谷歌应用引擎中的一个模块。我正在关注这篇博文以在 Ubuntu 上设置 QuantLib-SWIG。 http://blog.quantess.net/2012/09/26/quantlib-get-it-working-on-ubuntu/

在安装帖子中提到的所需的 boost c++ 库后,我已经使用 make -c Python 编译了 python 模块。

我已将 QuantLib 文件夹复制到我的应用程序文件夹中。 QunatLib 文件夹包含以下文件:

__init__.py
__init__.pyc
QuantLib.py
QuantLib.pyc
_QuantLib.so*

这是我的应用目录结构:

app.yaml
index.py
QuantLib/

但是,当我做一个

import QunatLib

在我的应用程序文件夹的 index.py 中,我收到以下错误:

<type 'exceptions.ImportError'>: No module named _QuantLib 
      args = ('No module named _QuantLib',) 
      message = 'No module named _QuantLib'

我也知道这是 dev_appserver 日志:

ImportError: No module named _QuantLib

_QuantLib 是一个.so 文件。有没有办法解决这个问题?或者任何其他方式将 QuantLib 库用于 GAE?

谢谢。

【问题讨论】:

    标签: google-app-engine python-2.7 quantlib quantlib-swig


    【解决方案1】:

    没有。

    有数量有限的不是纯 python 的 3rd 方库。您不能将自己的非纯 python 库添加到 appengine 运行时。

    这是包含的 3rd 方库https://developers.google.com/appengine/docs/python/tools/libraries27的当前列表

    您可以在自己的代码库中添加任何纯python库。

    【讨论】:

    • 谢谢蒂姆。这很有帮助。我想我会看看其他选择。
    猜你喜欢
    • 1970-01-01
    • 2018-01-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多