我试图运行pip install mysql-python connector
,但它一直给我一个错误“无法打开include文件:'config win.h'”。
安装在我的Mac和另一台Windows计算机上运行良好,但这次不行。我已经下载VisualStudioC++,并尝试安装为32位和64位。
_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No s
uch file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\c
l.exe' failed with exit status 2
----------------------------------------
Cleaning up...
Command C:\Users\Admin1\Desktop\python\virtual\Scripts\python.exe -c "import set
uptools, tokenize;__file__='C:\\Users\\Admin1\\Desktop\\python\\virtual\\build\\
MySQL-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).r
ead().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\admin
1\appdata\local\temp\1\pip-6pmwrd-record\install-record.txt --single-version-ext
ernally-managed --compile --install-headers C:\Users\Admin1\Desktop\python\virtu
al\include\site\python2.7 failed with error code 1 in C:\Users\Admin1\Desktop\py
thon\virtual\build\MySQL-python
Storing debug log for failure in C:\Users\Admin1\pip\pip.log
对于64位窗口
使用轮子安装
从http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python下载
对于python 3.x:
对于Python2.7:
这对我不起作用:
所以我在stackoverflow上发现了这个:
并且贯穿了整个过程,不需要MS Visual C++ 14的构建工具和东西
注意:目前这对Python3.7不起作用,我还不得不降级到Python3.6.5
这对我很有用:
这是针对windows 7中的python 3.x的,我不确定其他windows操作系统版本
相关问题 更多 >
编程相关推荐