Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/310.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何为Python 3.4安装MySQLdb?PIP不工作,即使我有VisualC++可重新分配的VisualStudio 2013包_Python_Mysql_Python 3.x - Fatal编程技术网

如何为Python 3.4安装MySQLdb?PIP不工作,即使我有VisualC++可重新分配的VisualStudio 2013包

如何为Python 3.4安装MySQLdb?PIP不工作,即使我有VisualC++可重新分配的VisualStudio 2013包,python,mysql,python-3.x,Python,Mysql,Python 3.x,这是我在尝试命令pip install MySQL python for python 3.4时返回的错误,您知道如何解决这个问题吗 我已经安装了VisualStudio 2013的VisualC++可重新分配包,从 当我发现pip不起作用时,我会转而使用easy_install。@user590028我该怎么做?我需要安装新的东西吗?使用什么命令来安装MySQL?您需要Visual Studio 2010为Python 3.4构建扩展。不支持Python 3。做非官方二进制文件位于 C:\Wi

这是我在尝试命令pip install MySQL python for python 3.4时返回的错误,您知道如何解决这个问题吗

我已经安装了VisualStudio 2013的VisualC++可重新分配包,从


当我发现pip不起作用时,我会转而使用easy_install。@user590028我该怎么做?我需要安装新的东西吗?使用什么命令来安装MySQL?您需要Visual Studio 2010为Python 3.4构建扩展。不支持Python 3。做非官方二进制文件位于
C:\Windows\System32>pip install MySQL-python
Downloading/unpacking MySQL-python
  Running setup.py (path:C:\Users\Matthew\AppData\Local\Temp\pip_build_Matthew\M
ySQL-python\setup.py) egg_info for package MySQL-python

Installing collected packages: MySQL-python
  Running setup.py install for MySQL-python
    building '_mysql' extension
    error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

    Complete output from command C:\Python34\python.exe -c "import setuptools, t
okenize;__file__='C:\\Users\\Matthew\\AppData\\Local\\Temp\\pip_build_Matthew\\M
ySQL-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).re
ad().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Matthe
w\AppData\Local\Temp\pip-db8fnhk5-record\install-record.txt --single-version-ext
ernally-managed --compile:
    running install

running build

running build_py

creating build

creating build\lib.win32-3.4

copying _mysql_exceptions.py -> build\lib.win32-3.4

creating build\lib.win32-3.4\MySQLdb

copying MySQLdb\__init__.py -> build\lib.win32-3.4\MySQLdb

copying MySQLdb\converters.py -> build\lib.win32-3.4\MySQLdb

copying MySQLdb\connections.py -> build\lib.win32-3.4\MySQLdb

copying MySQLdb\cursors.py -> build\lib.win32-3.4\MySQLdb

copying MySQLdb\release.py -> build\lib.win32-3.4\MySQLdb

copying MySQLdb\times.py -> build\lib.win32-3.4\MySQLdb

creating build\lib.win32-3.4\MySQLdb\constants

copying MySQLdb\constants\__init__.py -> build\lib.win32-3.4\MySQLdb\constants

copying MySQLdb\constants\CR.py -> build\lib.win32-3.4\MySQLdb\constants

copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.4\MySQLdb\constants


copying MySQLdb\constants\ER.py -> build\lib.win32-3.4\MySQLdb\constants

copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.4\MySQLdb\constants

copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.4\MySQLdb\constants

copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.4\MySQLdb\constants

running build_ext

building '_mysql' extension

error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

----------------------------------------
Cleaning up...
Command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Use
rs\\Matthew\\AppData\\Local\\Temp\\pip_build_Matthew\\MySQL-python\\setup.py';ex
ec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'
), __file__, 'exec'))" install --record C:\Users\Matthew\AppData\Local\Temp\pip-
db8fnhk5-record\install-record.txt --single-version-externally-managed --compile
 failed with error code 1 in C:\Users\Matthew\AppData\Local\Temp\pip_build_Matth
ew\MySQL-python
Storing debug log for failure in C:\Users\Matthew\pip\pip.log

C:\Windows\System32>