Reputation: 725
Hey, I'm having a bit of trouble importing m2crypto to google app engine. I think I know the problem but don't know how to fix it. Anyway, here's my directory structure.
mysite/
app.yaml
main.py
urls.py
...
M2Crypto/
__init.py__ (I think the problem is here)
EVP.py
...
SWIG/
(there is no __init.py___ file here)
_m2crypto.i
...
When I do this from M2Crypto import EVP
, I get an error message that says <type 'exceptions.ImportError'>: No module named __m2crypto
. This error is in the __init.py__
file where it attempts to import __m2crypto
on line 22. But there is no __m2crypto
file in the M2Crypto directory.
I'm using version 0.21.1 of M2Crypto and only copied M2Crypto and SWIG to my application. I've also tried copying every file in the M2Crypto-0.21.1.tar.gz to my application but that didn't work either. Thanks in advance.
Upvotes: 0
Views: 1004
Reputation: 8292
It appears as though m2crypto has several requirements that aren't going to work well on App Engine. Your application is sandboxed, all of the libraries used must be pure Python.
You don't state what you're actually trying to do, but note that PyCrypto is included with App Engine. You may also want to look into using the URLFetch service.
Upvotes: 3