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.登录网址https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
找到MySQL client对应的python版本,windows本地使用win32,虚拟环境使用adm
2.下载完成后,cmd进入到下载的目录地址,执行命令pip install xxx.whl文章来源:https://www.toymoban.com/news/detail-462283.html
问题解决。文章来源地址https://www.toymoban.com/news/detail-462283.html
到了这里,关于pip install mysqlclient报错 error: Microsoft Visual C++ 14.0 or greater is required的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!