My http server is based on BaseHTTPServer with Python 2.7.6. Now I want it to support ssl transportation, so called https.
Active3 years, 11 months ago
I'm developer and I need to make my enviroment work with Python 2.7.6 (not 2.7.3) on the Ubuntu 12.04. Please, provide me some notes how to do that?
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:
enigma
3,29222 gold badges1313 silver badges3030 bronze badges
林家访林家访
1 Answer
I fixed the problem finally!The _ssl module is a built-in module for python, but it requires openssl installed on your system.
Change to root user first!1.Install openssl and libssl-dev.If on debian OS
Python 2.7.6 Download Free
2.Recompile python
![]()
But actually, I fix the problem in this way!1.Install opensslI download a package from the Internet, which is openssl-1.0.2d.tar.gz
2.Recompile python2.7, and make it support ssl module
find the following line and uncomment it.(use /ssl+Enter to quickly locate these lines in vim)
and then config and make, make install
Our project depends on libpython2.7.so.1.0. Now I can 'import ssl' or 'import _ssl' successfully in my python script or python interpreter with the new libpython2.7.so.1.0.
Clean windows 7 download. May 07, 2016 Windows 7 Forums is the largest help and support community, providing friendly help and advice for Microsoft Windows 7 Computers such as Dell, HP, Acer, Asus or a custom build. So i clean install win7 ultimate in my laptop, everythig went fine until i discover that no drivers have been installed such is Ethernet, wireless and USB driver.
林家访林家访
Not the answer you're looking for? Browse other questions tagged pythonsslhttpshttpserver or ask your own question.
![]() Python runs on Windows, Linux/Unix, Mac OS X, OS/2, Amiga, Palm Handhelds, and Nokia mobile phones. The app has also been ported to the Java and .NET Python 2.7.6 Download Freevirtual machines. The app is distributed under an OSI-approved open source license that makes it free to use, even for commercial products.Some of its key distinguishing features include:
Python 2.7.6 Download Pc
Also Available: Download Python for Mac
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |