How do I configure multiple Ubuntu Python installations to avoid App Engine's SSL error?

吃可爱长大的小学妹 提交于 2019-11-30 09:54:29

You should be able to simply install Ubuntu's standard copy of Python 2.5. The SSL module isn't a requirement - as the warning message says, it's necessary if you want to do certificate validation, but that's all.

The error you're getting with a missing 'HTTPSHandler' is probably due to installing a version of Python that was compiled without SSL support (this is independent of the ssl module, which is what does certificate validation) - again, try installing the standard version.

As far as version selection goes, installing Python 2.5 shouldn't intefere with the default system version - there's a selector tool for choosing which version is the default - so you can simply run the dev_appserver etc with 'python2.5 dev_appserver.py'.

On Ubuntu 9.10, a simple sudo aptitude install python2.5 should do the trick, then just call the scripts by prepending python2.5, like this:

python2.5 google_appengine/dev_appserver.py ...

On Ubuntu 10.04 however, this is a whole lot different since Python 2.5 is not in the repositories anymore... This means installing from source, and from having had to do it, I can tell you it's not funny. It just makes you wish Google would move on issue 757.

Installing the SSL support for Python 2.5 is the same, whether installed from the repos or compiled from source. Just download the SSL lib for 2.5, un-package it, and run

sudo python2.5 setup.py install

Edit: Comment 51 of previously cited issue explains in detail how to install Python 2.5 on Ubuntu 10.04. As you can see, this is really cumbersome!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!