开发者

Is there a prebuilt version of python 2.7 mySql db APIs to install and use with django or do i have to really build it from scratch?

开发者 https://www.devze.com 2023-02-08 12:16 出处:网络
i want to install django and use mysql as the backend. i installed django and it worked fine.i am now following the first tutorial and created mysite.

i want to install django and use mysql as the backend.

i installed django and it worked fine. i am now following the first tutorial and created mysite.

After putting the mysql backend into into the settings.py, the web server no longer ran. I g开发者_JAVA百科et the following error:

raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

i already have a mysql instance setup on a remote machine. i changed the settings.py file with my db info but following to install and the initial tutorial, it still seems to want me to install Python database API 2.0 interface for the MySQL 5.1 database.

the only links i see are to the source code.

Is there a prebuilt version of mysql for python libraries that work for python 2.7 and are built so i don't need C++ compilers, etc on my machine to get django setup.


For windows you might try the binary installer from http://www.codegood.com/archives/129

On linux you would normally install it using the native package manager, e.g. sudo apt-get install mysql-python or via sudo easy_install mysqld.

The easy_install way will also work on windows provided you have installed the right version of Visual Studio (2010?) or mingw.

0

精彩评论

暂无评论...
验证码 换一张
取 消