My http server is based on BaseHTTPServer with Python 2.7.6. Now I want it to support ssl transportation, so called https.
I have installed pyOpenSSL and recompiled python source code with ssl support. And it does work when I try import ssl
in my python interpreter, but it doesn't work when I run the code on my server. The error log is like this:
import _ssl # if we can't import it, let the error propagate
It looks quite strange, doesn't it? My operating system is Debian Linux distribution. I have tried all kinds of ways which I can find on the Internet for days, anyone can help me get out of this trouble?
I tried to "import _ssl" in server code directly, but it reminds me this:
>>>callstack
Traceback (most recent call last):File "./script/main.py", line 85, in processnet_flag = net_api_process()File "./script/core/netbase/interface.py", line 96, in net_api_processflag1 = network.instance().process()File "./script/core/netbase/network.py", line 271, in processif network.process(max_events):File "./script/core/netbase/network.py", line 75, in on_incomin_streamself.on_package(buf)File "./script/core/netbase/network.py", line 78, in on_packageself.f_on_package(self, buf)File "./script/client/behavior.py", line 68, in on_packagehandler.OnPackage(pack, cmd, conn.m_uid, conn)File "./script/client/handler.py", line 288, in OnPackagefunc(uid, conn, pack)File "./script/logic/user_info/modify.py", line 365, in OnModBaseInfoModBaseInfo(uid, conn, seq, json_str)File "./script/logic/user_info/modify.py", line 385, in ModBaseInfomodify_pub.Start()File "./script/logic/user_info/modify.py", line 253, in Startimport _ssl
ImportError: No module named _ssl