1.先看報錯截圖:
2.報錯信息:
?a) error: subprocess-exited-with-error
??Running setup.py install for mysqlclient did not run successfully.
b)?
?error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
? ? ? [end of output]
? note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> mysqlclient
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
問題解決:
1.登錄網(wǎng)址https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
找到MySQL client對應(yīng)的python版本,windows本地使用win32,虛擬環(huán)境使用adm
2.下載完成后,cmd進入到下載的目錄地址,執(zhí)行命令pip install xxx.whl文章來源:http://www.zghlxwxcb.cn/news/detail-462283.html
問題解決。文章來源地址http://www.zghlxwxcb.cn/news/detail-462283.html
到了這里,關(guān)于pip install mysqlclient報錯 error: Microsoft Visual C++ 14.0 or greater is required的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!