views:

330

answers:

1

Hello

I installed stackless pyton 2.6.2 after reading several sites that said its fully compatible with vanilla python. After installing i found that my django applications do not work any more.

I did reinstall django (1.1) again and now im kind of lost. The error that i get is 500:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log. Apache/2.2.11 (Ubuntu) DAV/2 PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch mod_python/3.3.1 Python/2.6.2 mod_ruby/1.2.6 Ruby/1.8.7(2008-08-11) mod_ssl/2.2.11 OpenSSL/0.9.8g Server at 127.0.0.1 Port 80

What else, could or should i do?

Edit: From 1st comment i understand that the problem is not in django but mod_python & apache? so i edited my question title.

Edit2: I think something is wrong with some paths setup. I tried going from mod_python to mod_wsgi, managed to finally set it up correctly only to get next error: [Sun Aug 16 12:38:22 2009] [error] [client 127.0.0.1] raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) [Sun Aug 16 12:38:22 2009] [error] [client 127.0.0.1] ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

Alan

+2  A: 

When you install a new version of Python (whether stackless or not) you also need to reinstall all of the third party modules you need -- either from sources, which you say you don't want to do, or from packages built for the new version of Python you've just installed.

So, check the repository from which you installed Python 2.6.2 with aptitude: does it also have versions for that specific Python of mod_python, mysqldb, django, and any other third party stuff you may need? There really is no "silver bullet" for package management and I know of no "sumo distribution" of Python bundling all the packages you could ever possibly need (if there were, it would have to be many 10s of GB;-).

Alex Martelli
Zayatzz
The page for any version of Python can have no possible idea of whether you're going to use that version with apache, or nginx, via mod_python or maybe mod_wsgi, and/or django, or maybe pylons, or perhaps werkzeug, and why not PyQt, or maybe wxPython, perhaps NLTK, or Traits, or .... there's a BAJILLION third-party extensions of Python, how could *any* Python version possibly KNOW which ones you're using with your previous existing version and will therefore need to install somehow or other in updated versions?! This is NOT a reasonable whine!-)
Alex Martelli
Zayatzz
The repository from which you got the .apt file for Python 2.6 should also presumably have .apt files for all kinds of other modules to extend it -- if it doesn't or doesn't indicate them clearly then asking whoever maintains that repo to clarify things seems like the first line of approach.
Alex Martelli
Ohwell. What i had to do was to go here : http://sourceforge.net/projects/mysql-python/files/Then find out that i also need setuptools and download/install them.Then, after compiling mysql-python find that i need to create folder /var/www/.python_eggs and voila... i got my django working again. Now i just need to figure out why my newly compiled PIL refuses to work with django (if that is the case). At least my form returns me "wrong image format" when uploading .jpeg picture.
Zayatzz