0

(windows server 2008 r2) python 34,

I changed settings.py:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'mydatabase',
        'USER': 'mydatabaseuser',
        'PASSWORD': 'mypassword',
        'HOST': '127.0.0.1',
        'PORT': '5432',
    }
}

1) I run the command:

python manage.py migrate

i get an error: error loading mysqldb module django.core.exception error loading mysqldb

2) I run the command:

 pip install mysql -python

get "failed building wheel for mysql-python microsoft visulal c++ 2010 is required unable to find vcvarsall.bat

3) visual c++ 2010 was installed

I have in system variable path to:C:\Python34\Scripts;C:\Python34;

Furthermore i success to run commands from python to mysql (create\read\write table)

what else can i do in order the command python manage.py migrate will work?

3 Answers 3

1

You can use mysqlclient , it supports Python3 .You can read about it in django docs.

Sign up to request clarification or add additional context in comments.

Comments

0

If
pip install MySQL-python
is failing, you can try
easy_install MySQL-python.

Also install this: sudo apt-get install python-mysqldb

1 Comment

same error: error: Setup script exited with error: Microsoft Visual C++ 10.0 is required (Un unble to find vcvarsall.bat).
0

Solved by running the following command: pip install mysqlclient

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.