Reputation: 1157
I'm trying to import PyML on Google App Engine as a requirement for another library, however I am getting the following import error:
File "/base/data/home/apps/s~myapp/uno.385079313378714244/PyML/__init__.py", line 4, in <module>
from PyML.containers import *
File "/base/data/home/apps/s~myapp/uno.385079313378714244/PyML/containers/__init__.py", line 3, in <module>
VectorDataSet = __import__('PyML.containers.vectorDatasets', fromlist=['']).VectorDataSet
File "/base/data/home/apps/s~myapp/uno.385079313378714244/PyML/containers/vectorDatasets.py", line 5, in <module>
from PyML.containers.baseDatasets import WrapperDataSet, BaseVectorDataSet
File "/base/data/home/apps/s~replimeapp/uno.385079313378714244/PyML/containers/baseDatasets.py", line 4, in <module>
from PyML.containers import ker
File "/base/data/home/apps/s~myapp/uno.385079313378714244/PyML/containers/ker.py", line 6, in <module>
from ext import ckernel
File "/base/data/home/apps/s~myapp/uno.385079313378714244/PyML/containers/ext/ckernel.py", line 25, in <module>
_ckernel = swig_import_helper()
File "/base/data/home/apps/s~myapp/uno.385079313378714244/PyML/containers/ext/ckernel.py", line 17, in swig_import_helper
import _ckernel
ImportError: No module named _ckernel
I've searched for this error online and can find other people that had the issue, however no answers are given.
UPDATE Code which causes the error:
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_ckernel', [dirname(__file__)])
except ImportError:
import _ckernel
return _ckernel
if fp is not None:
try:
_mod = imp.load_module('_ckernel', fp, pathname, description)
finally:
fp.close()
return _mod
_ckernel = swig_import_helper()
del swig_import_helper
else:
import _ckernel
del version_info
Upvotes: 0
Views: 162
Reputation: 12986
That code appears to be using swig. Appengine runtime sandbox limits 'c' based binary libs to a supported set. Swig typically implies compiled C/C++ wrapped in Python. So it would appear this can not run on appengine, unless they have a pure python option.
You could run it under a managed VM.
You should probably go back and have a read up on the appengine Python sandbox and it's limitations and what directly supported 3rd party libraries are available.
Upvotes: 1