python mysql扩展_关于python:构建’_mysql’扩展错误:无法找到vcvarsall.bat

我正在尝试通过pip mysql安装python 3.5。 我发现我有丢失的文件,vcvarsall.bat in

"C: Program Files(x86) Microsoft Visual Studio 9.0 VC vcvarsall.bat"

但我不知道如何修改istall脚本指向vcvarsall.bat

这是安装的输出。 我试过建议的解决方案,我已经安装了Express 8,Windows SDK,但似乎没有任何帮助。

PS C:\Python35\Scripts> .\pip.exe install mysql

Collecting mysql

Downloading mysql-0.0.1.tar.gz

Collecting MySQL-python (from mysql)

Downloading MySQL-python-1.2.5.zip (108kB)

100% |################################| 110kB 866kB/s

Installing collected packages: MySQL-python, mysql

Running setup.py install for MySQL-python

Complete output from command

c:\python35\python.exe -c"import setuptools, tokenize;__file__='C:\\Users\\Arthur\\AppData\\Local\\Temp\\pip-build t876fqxc\\MySQL-pyth

n\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('

', '

'), __file__, 'exec'))" install --record C:\Users\Arthur\AppData\Local\Temp

pip-ohodnfbo-record\install-record.txt --single-version-externally-managed --

compile:

running install

running build

running build_py

creating build

creating build\lib.win-amd64-3.5

copying _mysql_exceptions.py -> build\lib.win-amd64-3.5

creating build\lib.win-amd64-3.5\MySQLdb

copying MySQLdb\__init__.py -> build\lib.win-amd64-3.5\MySQLdb

copying MySQLdb\converters.py -> build\lib.win-amd64-3.5\MySQLdb

copying MySQLdb\connections.py -> build\lib.win-amd64-3.5\MySQLdb

copying MySQLdb\cursors.py -> build\lib.win-amd64-3.5\MySQLdb

copying MySQLdb

elease.py -> build\lib.win-amd64-3.5\MySQLdb

copying MySQLdb\times.py -> build\lib.win-amd64-3.5\MySQLdb

creating build\lib.win-amd64-3.5\MySQLdb\constants

copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.5\MySQLdb\constants

copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.5\MySQLdb\constants

copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.5\MySQLdb\constants

copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.5\MySQLdb\constants

copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.5\MySQLdb\constants

copying MySQLdb\constants

EFRESH.py -> build\lib.win-amd64-3.5\MySQLdb\constants

copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.5\MySQLdb\constants

running build_ext

building '_mysql' extension

error: Unable to find vcvarsall.bat

UPDATE。 vsvarsall.bat错误消失后,我将它的副本放入VC express的bin文件夹中。

但现在我收到了这个错误

cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5"-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -Ic:\

hon35\include -Ic:\python35\include /Tc_mysql.c /Fobuild\temp.win-amd64-3.5

elease\_mysql.obj /Zl

error: command '**cl.exe**' failed: No such file or directory

但是当我在Windows文件夹中放入cl.exe的副本时,我收到此错误:

[cc lang="python"]

command 'C:\\WINDOWS\\cl.exe' failed with exit status -1073741515

代码> PRE>

pip安装脚本在哪里?

Sovled

After I installed Microsoft Community Edition, now I have in

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

cl.exe,用于在我的amd64位机器上编译Python 3.5的模块

可能的错误重复:无法找到vcvarsall.bat

试试pymysql。https://github.com/PyMySQL/PyMySQL

它是纯Python,所以你不必担心构建任何东西以使其工作。 我已经使用了它们,它们对我来说都很好用。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值