简体   繁体   English

谷歌appengine的python样板获取导入错误?

[英]python boilerpipe with google appengine getting import error?

I am trying work out python boilerpipe with google app engine. 我正在尝试使用Google App Engine解决python样机。 I have installed boilerpipe and its working fine in my local machine. 我已经在本地计算机上安装了样管,并且可以正常工作。

boilerpipe installed using pip 使用pip安装样板

pip install boilerpipe

github link github链接

sample program works fine with given url 示例程序在给定的URL下可以正常工作

from boilerpipe.extract import Extractor
extractor = Extractor(extractor='ArticleExtractor', url=your_url)
print(extractor.getText())

Trial 1: 试用1:

but the same code when I run with google_appengine generates ImportError 但是当我使用google_appengine运行时,相同的代码会生成ImportError

Trial 2 试用2

then after some research I copied modules from dist_packages to project directory. 然后经过研究,我将模块从dist_packages复制到项目目录。 Now I am getting _jpype module not found 现在我_jpype module not found

Trial 3 试用3

This time I downloaded the packages and trying to build and install in project directory. 这次我下载了软件包,并尝试在项目目录中进行构建和安装。 boilerpipe installed without error. 锅炉管安装无误。 but jpype giving error jni.h no such file or directory 但是jpype给错误jni.h no such file or directory

How could I resolve import error? 如何解决导入错误? Whats the problem with google_appengine while the same code is working properly in local machine? 当相同的代码在本地计算机上正常运行时,google_appengine会出现什么问题?

You can not use libraries that have arbitrary dependancies on 'c' code or that create subprocesses. 您不能使用对'c'代码有任意依赖性的库或创建子流程的库。

Please see documentation on the python appengine sandbox to understand the limitations. 请参阅python appengine沙箱上的文档以了解限制。 https://developers.google.com/appengine/docs/python/#Python_The_sandbox https://developers.google.com/appengine/docs/python/#Python_The_sandbox

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM