gpt4 book ai didi

Python - 无法使用 pip 安装 MysqlClient 模块

转载 作者:行者123 更新时间:2023-11-29 21:42:09 25 4
gpt4 key购买 nike

我有 mysqlclient,它是 mysqlDB for python3.4.3 的一个分支,它工作得很好但我已经删除了我的 python 并安装了 python 3.4.4,当我尝试安装它时,我得到了这个输出。错误是 Value Error: ['Patch']我正在尝试使用 python 3.4.4 64 位在 Windows 7 上安装它

Collecting mysqlclient   Using cached mysqlclient-1.3.7.tar.gz Installing collected packages: mysqlclient   Found existing installation: mysqlclient 1.3.6
Uninstalling mysqlclient-1.3.6:
Successfully uninstalled mysqlclient-1.3.6 Running setup.py install for mysqlclient
Complete output from command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\Ali\\AppData\\Local\\Temp\\pip-build-g5lszj4o\\mysqlclient\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Ali\AppData\Local\Temp\pip-shnmp7r6-record\install-record.txt
--single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
copying _mysql_exceptions.py -> build\lib.win-amd64-3.4
creating build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\compat.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.4\MySQLdb
creating build\lib.win-amd64-3.4\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.4\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.4\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.4\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.4\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.4\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-3.4\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.4\MySQLdb\constants
running build_ext
building '_mysql' extension
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Ali\AppData\Local\Temp\pip-build-g5lszj4o\mysqlclient\setup.py", line 21, in <module>
setuptools.setup(**metadata)
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Python34\lib\distutils\command\install.py", line 539, in run
self.run_command('build')
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\distutils\command\build.py", line 126, in run
self.run_command(cmd_name)
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\build_ext.py", line 49, in run
_build_ext.run(self)
File "C:\Python34\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Python34\lib\distutils\command\build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "C:\Python34\lib\site-packages\setuptools\command\build_ext.py", line 174, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Python34\lib\distutils\command\build_ext.py", line 503, in build_extension
depends=ext.depends)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python34\lib\site-packages\setuptools\msvc9_support.py", line 52, in query_vcvarsall
return unpatched['query_vcvarsall'](version, *args, **kwargs)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']

---------------------------------------- Rolling back uninstall of mysqlclient

最佳答案

看起来这是 python 3.4.4 的问题,因为据我所知,它还不是最终版本。回到 python 3.4.3 已修复问题

关于Python - 无法使用 pip 安装 MysqlClient 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34398801/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com