试图python manage.py syncdb但它给了我一个错误。类似于这里的许多其他问题,但提供的解决方案并不能解决我安装后的错误。在
我的项目目录中的settings.py文件DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'network',
'USER': 'root',
'PASSWORD': 'mypass',
'HOST': '', #EMPTY FOR LOCALHOST
'PORT': '3307', #Empty by default
}
}
我使用的是Windows7,Python3.4(听说与安装MySQL Python不兼容,所以我下载了MySQLClient1.3.6)。在
当我运行easy_install mysql-python时,结果是
^{pr2}$
类似地,当运行pip install mysql-python时,它会请求config win.h,同时会出现一个可怕的错误Command "D:\Users\Python\python.EXE -c "import setuptools, tokenize;__file__='C:\\Users\\AppData\\Local\\T
emp\\pip-build-w7q9kjxi\\mysql-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\AppData\Local\Temp\pip-u982sugf-record\install-record.t
xt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\AppData\Local\Temp\pip-build
-w7q9kjxi\mysql-python
我对此很困惑。我一直在看的教程偏离了我的方向,我不知道如何处理mysqlclient的WHL。在
我已经试过了:easy_install Distribute起作用,但不会改变任何东西
python manage.py syncdb没有名为“MySQLdb”的模块
apt-get install python-mysqldb术语“apt get”根本无法识别。
请帮助这个初学者的问题,谢谢你的时间,如果需要更多的信息,我很乐意提供。在