On Wed, Feb 18, 2009 at 10:44 AM, djandrow <andrewkenyon...@gmail.com>wrote:
> > Hello, > > I have python 2.5 and 2.6 installed on my computer and when i try to > run manage.py sqlall I get an error: > > raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) > django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb > module: Module use of python25.dll conflicts with this version of > Python. > > This is because it is using python 2.6 and the mysql backend is for > 2.5, there isn't an exe backend for windows. > Actually, there is an exe for 2.6, see: http://groups.google.com/group/django-users/msg/5b5f4dee148d0fc3 I gave that a brief try and it worked for me (ignoring some deprecation warnings about sets). > I'm using the command line and want to know how i can change the > python versions. I have my system path set up for 2.5 so I don't know > what effect that has. > Apparently you've put something in your system PATH setting that is pulling in Python 2.5 stuff even when you are running Python 2.6, but I'm not sure what. I've found it fairly easy to switch between two Pythons on Windows by letting the last install (2.6 in my case) set up the file association for .py to the 2.6 Python executable and having the 2.5 Python directory (just the location of python.exe, nothing else) in the PATH. Then when I issue a command like 'python script.py', script.py runs under Python 2.5, but if I run just 'script.py', it runs under 2.6. (I've also got 2.3 and 2.4 installed for testing purposes, when I want one of them I have to specify the full path to the correct python.exe I want to use.) Prior to getting that mysqldb exe for 2.6, if I tried to use MySQL with Python2.6 I'd get an error "No module named MySQLdb", since there was no MySQLdb installed under 2.6. The fact that in your case it's finding some MySQLdb but then running into trouble with the Python version makes me think you've put something on your system path that really shouldn't be there and isn't necessary. If you just put the base Python directory in the path, that is the python that will be used when you prefix commands with "python", and it will correctly search its tree (and only its tree) for extensions. Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---