{"id":732,"date":"2020-08-07T11:16:49","date_gmt":"2020-08-07T03:16:49","guid":{"rendered":"https:\/\/blog.humh.cn\/?p=732"},"modified":"2020-08-07T11:16:50","modified_gmt":"2020-08-07T03:16:50","slug":"%e8%a7%a3%e5%86%b3pip-install-mysqldb%e6%97%b6fatal-error-my_config-h-file-not-found%e5%bc%82%e5%b8%b8","status":"publish","type":"post","link":"https:\/\/blog.humh.cn\/?p=732","title":{"rendered":"\u89e3\u51b3pip install MySQLdb\u65f6\u201cfatal error: 'my_config.h' file not found\u201d\u5f02\u5e38"},"content":{"rendered":"\n<p><s>7\u6708\u521a\u6362\u7684\u5de5\u4f5c\uff0c\u8bd5\u7528\u671f\u671f\u95f4\uff0c\u8981\u505a\u7684\u4e8b\u60c5\u6bd4\u8f83\u591a\uff0c\u4e00\u76f4\u6ca1\u6709\u7cbe\u529b\u603b\u7ed3\u3002\u6700\u8fd1\u7a0d\u5fae\u8f7b\u677e\u4e9b\uff0c\u628a\u4eca\u5929\u9047\u5230\u7684\u8d76\u7d27\u603b\u7ed3\u4e0b\u3002\u4e4b\u540e\u4f1a\u628a\u4e0a\u4e2a\u6708\u62c9\u4e0b\u7684\u5185\u5bb9\uff0c\u8865\u5145\u4e0b\u3002<\/s><br>\u4ee5\u4e0a\u5168\u662f\u5e9f\u8bdd\u3002\u3002\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>\u672c\u6587\u901a\u8fc7mac\u5b9e\u8df5\u7684\uff0c\u6240\u4ee5\u4e5f\u9002\u7528\u4e8e\u5176\u4ed6linux\u7248\u672c\u3002\u5bf9\u4e8ewindows\uff0c\u64cd\u4f5c\u53ef\u80fd\u4e0d\u76f8\u540c\uff0c\u4f46\u89e3\u51b3\u7684\u601d\u8def\u5927\u540c\u5c0f\u5f02\uff0c\u53ef\u505a\u53c2\u8003\u3002<\/p><\/blockquote>\n\n\n\n<p>\u4eca\u5929\u5728\u51c6\u5907\u5229\u7528\u53e4\u8001\u7684MySQLdb\u5b8c\u6210python\u5bf9mysql api\u7684\u64cd\u4f5c\uff0cpip install\u65f6\uff0c\u4e00\u76f4\u62a5\u5982\u4e0b\u9519\u8bef\uff1a<br><code>fatal error: 'my_config.h' file not found<\/code><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">  building '_mysql' extension\n  creating build\/temp.macosx-10.13-x86_64-2.7\n  clang -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I\/usr\/local\/Cellar\/mysql\/8.0.19_1\/include\/mysql -I\/Users\/humh\/.pyenv\/versions\/2.7.12\/envs\/confcv\/include\/python2.7 -c _mysql.c -o build\/temp.macosx-10.13-x86_64-2.7\/_mysql.o\n  _mysql.c:44:10: fatal error: 'my_config.h' file not found\n  #include \"my_config.h\"\n           ^~~~~~~~~~~~~\n  1 error generated.\n  error: command 'clang' failed with exit status 1\n  ----------------------------------------\n  ERROR: Failed building wheel for MySQL-python\n  Running setup.py clean for MySQL-python\nFailed to build MySQL-python\nInstalling collected packages: MySQL-python\n    Running setup.py install for MySQL-python ... error\n    ERROR: Command errored out with exit status 1:\n<\/pre>\n\n\n\n<p>\u6587\u4ef6\u7f3a\u5931\uff1f\uff1f \u627e\u4e86\u4e00\u901a\u5ea6\u5a18\u540e\uff0c\u53d1\u73b0\u89e3\u51b3\u65b9\u6848\u90fd\u662f<code>brew install mysql-connector-c<\/code>\u6216\u8005<code>export LDFLAGS<\/code>\u7b49\u7b49\uff0c\u5982<a href=\"https:\/\/stackoverflow.com\/questions\/50864438\/mac-pip-install-mysql-python-unsuccessful\">https:\/\/stackoverflow.com\/questions\/50864438\/mac-pip-install-mysql-python-unsuccessful<\/a><\/p>\n\n\n\n<p>\u8fd9\u91cc\u56e0\u4e3a\u6211\u4f7f\u7528\u7684mac\uff0c\u540c\u65f6\u6211\u5df2\u7ecfbrew install mysql\u4e86\uff0c\u8fd8\u9700\u8981mysql \u53caclient\uff0c\u6240\u4ee5\u6ca1\u6709\u518d\u5355\u72ec\u5b89\u88c5mysql-connector-c\u3002\u5176\u4ed6\u89e3\u51b3\u529e\u6cd5\u4e5f\u8bd5\u4e86\u5e76\u6ca1\u6709\u7528\u3002<\/p>\n\n\n\n<p>\u4e8e\u662f\uff0c\u6211\u53bbmysql doc\u4e2d\u67e5\u4e86\u4e0b\u201cmy_config.h\u201d\u662f\u600e\u4e48\u4e2a\u60c5\u51b5\uff0c\u5728\u8fd9\u91cc\uff08<a href=\"https:\/\/dev.mysql.com\/doc\/relnotes\/mysql\/8.0\/en\/news-8-0-2.html\">https:\/\/dev.mysql.com\/doc\/relnotes\/mysql\/8.0\/en\/news-8-0-2.html<\/a>\uff09\u627e\u5230\u4e86\u7b54\u6848\u3002\u539f\u6765\uff0c\u57288.0\u7684mysql \u5ba2\u6237\u7aef\u4e2d\uff0c\u5df2\u7ecf\u53bb\u6389\u4e86\u201cmy_config.h\u201d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-2.png\"><img width=\"970\" height=\"143\" class=\"wp-image-739 lazyload\" title=\"\u89e3\u51b3pip install MySQLdb\u65f6\u201cfatal error: 'my_config.h' file not found\u201d\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-2.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-2.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-2.png 970w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-2-300x44.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-2-768x113.png 768w\" sizes=\"(max-width: 970px) 100vw, 970px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u65e0\u610f\u95f4\uff0c\u4e5f\u770b\u5230\u4e86\u8fd9\u7bc7\u6587\u7ae0\uff08<a href=\"https:\/\/www.jianshu.com\/p\/71305f4d3536\">https:\/\/www.jianshu.com\/p\/71305f4d3536<\/a>\uff09\u4ece\u4e2d\u5f97\u5230\u4e86\u542f\u53d1\u3002\u65e2\u7136\u662f\u6587\u4ef6\u7f3a\u5931\uff0c\u90a3\u4e48\u6211\u53ef\u4ee5\u5c06\u7f3a\u5931\u6587\u4ef6\u8865\u5168\uff0c\u7136\u540e\u901a\u8fc7\u5bf9\u4f9d\u8d56\u5305\u6e90\u7801\u672c\u5730\u7f16\u8bd1\u8fdb\u884c\u5b89\u88c5\uff0c\u800c\u4e0d\u76f4\u63a5pip install\uff0c\u5982\u4e0b\u662f\u6210\u529f\u7684\u89e3\u51b3\u529e\u6cd5\uff1a<br>\u6ce8\uff1a\u4e0b\u6587\u4e2d\u201cMySQL-python\u201d\u7b49\u540c\u4e8e\u201cMySQLdb\u201d<\/p>\n\n\n\n<p><strong>1\u3001\u8865\u5168\u7f3a\u5931\u7684my_config.h<\/strong><\/p>\n\n\n\n<p>\u4ecegitee\u4e0a\u627e\u5230\u4e86\u4e00\u4e2a\u5927\u4f6c\u63d0\u4f9b\u7684\u5934\u6587\u4ef6<a href=\"https:\/\/gitee.com\/niukey\/acl\/blob\/master\/include\/mysql\/my_config.h\">https:\/\/gitee.com\/niukey\/acl\/blob\/master\/include\/mysql\/my_config.h<\/a>\uff0cdown\u4e0b\u6765\u3002\u8fd9\u91cc\u56e0\u4e3a\u6211\u7684mysql\u662f\u901a\u8fc7brew\u5b89\u88c5\u7684\uff0c\u6240\u6709bin\u547d\u4ee4\u90fd\u662f\u901a\u8fc7\u5982\u8f6f\u94fe\u7684\u5f62\u5f0f\uff0c\u6240\u4ee5\u8fd9\u91cc\u6211\u4e5f\u662f\u5c06\u201cmy_config.h\u201d\u8f6f\u94fe\u81f3bin\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-3.png\"><img width=\"1672\" height=\"528\" class=\"wp-image-740 lazyload\" title=\"\u89e3\u51b3pip install MySQLdb\u65f6\u201cfatal error: 'my_config.h' file not found\u201d\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-3.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-3.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-3.png 1672w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-3-300x95.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-3-1024x323.png 1024w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-3-768x243.png 768w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-3-1536x485.png 1536w\" sizes=\"(max-width: 1672px) 100vw, 1672px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u8fd9\u91cc\u56e0\u4e3a\u4f7f\u7528mac  iterm\uff0c\u6240\u4ee5restart session\u4e00\u4e0b\u3002<\/p>\n\n\n\n<p><strong>2\u3001\u4ecepip\u6e90\uff0c\u4e0b\u8f7dMySQL-python\u6e90\u7801<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/pypi.org\/project\/MySQL-python\/1.2.5\/#files\">https:\/\/pypi.org\/project\/MySQL-python\/1.2.5\/#files<\/a><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22.png\"><img width=\"1167\" height=\"390\" class=\"wp-image-737 lazyload\" title=\"\u89e3\u51b3pip install MySQLdb\u65f6\u201cfatal error: 'my_config.h' file not found\u201d\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22.png 1167w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-300x100.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-1024x342.png 1024w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-768x257.png 768w\" sizes=\"(max-width: 1167px) 100vw, 1167px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u9009\u62e9zip\uff0c\u5c06\u4e0b\u8f7d\u540e\u7684zip\u89e3\u538b\u5373\u53ef\uff0c\u89e3\u538b\u540e\u5927\u81f4\u5185\u5bb9\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-1.png\"><img width=\"2396\" height=\"140\" class=\"wp-image-738 lazyload\" title=\"\u89e3\u51b3pip install MySQLdb\u65f6\u201cfatal error: 'my_config.h' file not found\u201d\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-1.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-1.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-1.png 2396w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-1-300x18.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-1-1024x60.png 1024w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-1-768x45.png 768w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-1-1536x90.png 1536w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-1-2048x120.png 2048w\" sizes=\"(max-width: 2396px) 100vw, 2396px\"><\/a><\/figure><\/div>\n\n\n\n<p><strong>3\u3001\u4fee\u6539\u201c_mysql.c\u201d\u4e2d\u7684\u201cmy_config.h\u201d \u914d\u7f6e<\/strong><\/p>\n\n\n\n<p>\u6839\u636e\u62a5\u9519\u4fe1\u606f\uff0c\u53ef\u4ee5\u5f88\u6e05\u695a\u7684\u77e5\u9053\uff0c\u9519\u8bef\u53d1\u751f\u5728\u201c_mysql.c\u201d\u6587\u4ef6\u7684\u7b2c44\u884c\uff0c\u6211\u4eec\u627e\u5230\u9519\u8bef\u4f4d\u7f6e\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-4.png\"><img width=\"928\" height=\"804\" class=\"wp-image-741 lazyload\" title=\"\u89e3\u51b3pip install MySQLdb\u65f6\u201cfatal error: 'my_config.h' file not found\u201d\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-4.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-4.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-4.png 928w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-4-300x260.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-4-768x665.png 768w\" sizes=\"(max-width: 928px) 100vw, 928px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u5c06\u6b64\u5904\u7684\u201cmy_config.h\u201d\u6362\u6210\u4f60\u771f\u5b9emy_config.h \u547d\u4ee4\u8def\u5f84\uff0c\u8fd9\u91cc\u6362\u6210\u4e86\u7b2c\u4e00\u6b65\u8f6f\u94fe\u7684\u4f4d\u7f6e\uff1a\/usr\/local\/bin\/my_config.h\uff0c\u4fdd\u5b58\u5373\u53ef\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-5.png\"><img width=\"572\" height=\"164\" class=\"wp-image-742 lazyload\" title=\"\u89e3\u51b3pip install MySQLdb\u65f6\u201cfatal error: 'my_config.h' file not found\u201d\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-5.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-5.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-5.png 572w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-5-300x86.png 300w\" sizes=\"(max-width: 572px) 100vw, 572px\"><\/a><\/figure><\/div>\n\n\n\n<p><strong>4\u3001\u5bf9\u4f9d\u8d56\u5305\u6e90\u7801\u8fdb\u884c\u7f16\u8bd1\u4e0e\u5b89\u88c5<\/strong><\/p>\n\n\n\n<p>\u7f16\u8bd1\u6784\u5efa\uff1a<code>~\/.pyenv\/versions\/taskcv\/bin\/python2.7 setup.py build<\/code> \uff08python\u8def\u5f84\u6362\u6210\u4f60\u5bf9\u5e94python\u8def\u5f84\u5373\u53ef\uff09<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-6.png\"><img width=\"2858\" height=\"1466\" class=\"wp-image-743 lazyload\" title=\"\u89e3\u51b3pip install MySQLdb\u65f6\u201cfatal error: 'my_config.h' file not found\u201d\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-6.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-6.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-6.png 2858w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-6-300x154.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-6-1024x525.png 1024w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-6-768x394.png 768w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-6-1536x788.png 1536w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-6-2048x1051.png 2048w\" sizes=\"(max-width: 2858px) 100vw, 2858px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u6700\u7ec8build\u540e\u7684\u5185\u5bb9\uff0c\u4f60\u4f1a\u5728\u6e90\u7801build \u8def\u5f84\u4e0b\u770b\u5230<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1224\" height=\"80\" class=\"wp-image-744 lazyload\" title=\"\u89e3\u51b3pip install MySQLdb\u65f6\u201cfatal error: 'my_config.h' file not found\u201d\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-7.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-7.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-7.png 1224w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-7-300x20.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-7-1024x67.png 1024w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-7-768x50.png 768w\" sizes=\"(max-width: 1224px) 100vw, 1224px\"><\/figure>\n\n\n\n<p>\u5b89\u88c5\uff1a<code>~\/.pyenv\/versions\/taskcv\/bin\/python2.7 setup.py install<\/code>\uff08python\u8def\u5f84\u6362\u6210\u4f60\u5bf9\u5e94python\u8def\u5f84\u5373\u53ef\uff09<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-8.png\"><img width=\"1888\" height=\"242\" class=\"wp-image-745 lazyload\" title=\"\u89e3\u51b3pip install MySQLdb\u65f6\u201cfatal error: 'my_config.h' file not found\u201d\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-8.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-8.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-8.png 1888w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-8-300x38.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-8-1024x131.png 1024w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-8-768x98.png 768w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/08\/d2b5ca33bd970f64a6301fa75ae2eb22-8-1536x197.png 1536w\" sizes=\"(max-width: 1888px) 100vw, 1888px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u4f60\u4f1a\u5728python lib site-packages \u4e2d\u53d1\u73b0MySQL-python\u7684\u4f9d\u8d56\u5305\u3002<\/p>\n\n\n\n<p><strong>5\u3001\u6d4b\u8bd5<\/strong><\/p>\n\n\n\n<p>\u53ef\u4ee5\u901a\u8fc7python console\u4e2d\uff0c\u8f93\u5165<code>import MySQLdb<\/code> \u56de\u8f66\uff0c\u770b\u662f\u5426\u4f1a\u62a5\u201cNo model\u201d\u7684\u9519\u8bef\uff0c\u65e0\u9519\u5219\u6210\u529f\uff1b\u6216\u8005\u76f4\u63a5\u5728ide\u4e2dimport\u6d4b\u8bd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>7\u6708\u521a\u6362\u7684\u5de5\u4f5c\uff0c\u8bd5\u7528\u671f\u671f\u95f4\uff0c\u8981\u505a\u7684\u4e8b\u60c5\u6bd4\u8f83\u591a\uff0c\u4e00\u76f4\u6ca1\u6709\u7cbe\u529b\u603b\u7ed3\u3002\u6700\u8fd1\u7a0d\u5fae\u8f7b\u677e\u4e9b\uff0c\u628a\u4eca\u5929\u9047\u5230\u7684\u8d76\u7d27\u603b\u7ed3\u4e0b\u3002\u4e4b\u540e\u4f1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[66],"tags":[103,102,65],"_links":{"self":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts\/732"}],"collection":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=732"}],"version-history":[{"count":6,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts\/732\/revisions"}],"predecessor-version":[{"id":747,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts\/732\/revisions\/747"}],"wp:attachment":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}