在安装mysql客户端时出现此错误。甚至我都安装了Visual C ++,但同样的问题来了。
我已经搜索了这种类型的错误,但是我没有找到它。 我通过安装pymysql进行了尝试,更新了设置工具,在命令提示符下也显示了相同的错误。
Building wheels for collected packages: mysql client
Building wheel for mysql client (setup. p y) ... error
ERROR: Command error e d out with exit status 1:
c
building 'MySQL db._mys q l' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": ht t p s://visual studio. microsoft. com/downloads/
----------------------------------------
ERROR: Failed building wheel for mysql client
Running setup.p y clean for mysql client
Failed to build mysql client
Installing collected packages: mysql client
Running setup.p y install for mysql client ... error
ERROR: Command err o red out with exit status 1:
command: '
我尝试了很多方法,但是没有用。
k e, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\NA ND A N\App Data\Local\Temp\pip-record-v t l g_81 u\install-record. t x t' --single-version-externally-managed --compile --install-headers 'e:\n a n d an\n ex t p y t h on\pro j e c t 3\include\site\python 3.7\mysql client'
cw d: C:\Users\NAN DA N\A p p D at a\Local\Temp\pip-install-f g 2 25 i w m\my s q l client\
Complete output (24 lines):
running install
running build
running build_p y
creating build
creating build\lib.win32-3.7
building 'MySQL db._m m y s q l' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": ht t p s:/ / v is u a l stud i o. microsoft . com/downloads/
----------------------------------------
ERROR: Command er r ore d out with exit status 1: 'e:\n an d a n\next p y t hon\pro j e c t 3\scripts\python. e x e' -u -c 'import s y s, s e t up to o l s, to k e n i z e; s y s. a r g v[0] = '"'"'.enter code here`
答案 0 :(得分:0)
除非您需要从源代码编译它,否则最简单的解决方案通常是直接安装二进制文件:
pip install --only-binary :all: mysqlclient
希望有帮助!