python 3.5 - django 1.10 - mysqlclient windows 7安装错误 [英] python 3.5 - django 1.10 - mysqlclient windows 7 installation error
问题描述
我在Ubuntu x64上使用了python 3.5和Django 1.10,但是我无法做到这一点Windows 7。
我几乎尝试了一切,希望几乎:
- python 3.5
- 安装pip for python
- 升级所有可升级的东西
- 已安装django
- 安装visual studio 2015 for python 3.5
- 安装mysql服务器和工作台
- 安装所有连接器用于mysql C,python ,安装了odbc
- 与C ++ Redistributable 2013
- 安装mingw
- 下载mysqlclient 1.3.9
- 尝试使用堆栈信息编辑一些文件
- 更多的压力和做我能做的事情
所以我有很多错误,我可以通过,现在我有一个错误(希望最后),我不能做任何事情。
当我使用命令: python setup.py安装
在与mysqlclient的文件夹1.3.9我有错误:
C:\程序文件(x86)\MySQL\MySQL连接器C 6.1\include\_mingw.h(49):致命错误C1189:#error:ERROR:你必须使用GNU编译器。
我以为这是从Visual Studio编译器的问题,所以我尝试使用mingw作为默认gcc ,它帮助了另一个错误:
ValueError:未知MS编译器版本1900
我无法帮助自己,我现在无望
有人可以帮我安装mysqlclient在windows 7上有python 3.5使用它与django 1.10 ??
我只重复说,在Ubuntu上它是有效的。
如果你不需要最新的mysqlclient,你可以从这里抓住一个轮子:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
通常安装: pip install path_to_wheel.whl
它应该工作。看起来不像最新的mysqlclient版本添加了很多:
https://github.com/PyMySQL/mysqlclient-python/blob/master/HISTORY
希望帮助。
I have very disturbing me problem with configuring mysql in django.
I did it with python 3.5 and Django 1.10 on Ubuntu x64 but I can't do this on windows 7.
I tried almost everything, I hope almost:
- installed python 3.5
- installed pip for python
- upgrade everything what I can upgrade
- installed django
- installed visual studio 2015 for python 3.5
- installed mysql server and workbench
- installed all connectors for mysql C, python, odbc
- installed vs C++ Redistributable 2013
- installed mingw
- download mysqlclient 1.3.9
- trying to edit some files with information from stack
- more more stress and do things what I could do
So I had a lot of errors what I could pass and now I have one error (hope last) that I can't do anything with it.
when I use command: python setup.py install
in folder with mysqlclient 1.3.9 I got error:
C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include\_mingw.h(49): fatal error C1189: #error: ERROR: You must use a GNU Compiler.
I thought that it is problem with compiler from Visual Studio, so I try to use mingw as default gcc, it helped but with another error:
ValueError: Unknown MS Compiler version 1900
I can't help myself with it and I hopeless now
Can somebody help me install mysqlclient on windows 7 wit python 3.5 to use it with django 1.10??
I repeat only that on Ubuntu it is worked.
If you don't need the latest mysqlclient, you can grab a wheel from here:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
install it with usual: pip install path_to_wheel.whl
And it should work. Doesn't look like the latest mysqlclient version adds a lot:
https://github.com/PyMySQL/mysqlclient-python/blob/master/HISTORY
Hope that helps.
这篇关于python 3.5 - django 1.10 - mysqlclient windows 7安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!