{"id":465,"date":"2019-10-15T18:40:33","date_gmt":"2019-10-15T10:40:33","guid":{"rendered":"https:\/\/blog.espnlol.com\/?p=465"},"modified":"2023-02-06T15:15:01","modified_gmt":"2023-02-06T07:15:01","slug":"pip-install-mysqlclient%e6%8a%a5%e9%94%99%e5%bc%82%e5%b8%b8%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"https:\/\/blog.espnlol.com\/?p=465","title":{"rendered":"pip install mysqlclient\u62a5\u9519\u5f02\u5e38\u89e3\u51b3"},"content":{"rendered":"\n<p>Collecting mysqlclient<br>\n  Using cached https:\/\/files.pythonhosted.org\/packages\/4d\/38\/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284\/mysqlclient-1.4.4.tar.gz<br>\nInstalling collected packages: mysqlclient<br>\n    Running setup.py install for mysqlclient \u2026 error<br>\n    ERROR: Command errored out with exit status 1:<br>\n     command: \/Library\/Frameworks\/Python.framework\/Versions\/3.7\/bin\/python3.7 -u -c &#8216;import sys, setuptools, tokenize; sys.argv[0] = &#8216;&#8221;&#8216;&#8221;&#8216;\/private\/var\/folders\/9p\/wbk1ypzs5rv35d01phw8hvym0000gn\/T\/pip-install-55q_e669\/mysqlclient\/setup.py'&#8221;&#8216;&#8221;&#8216;; <strong>file<\/strong>='&#8221;&#8216;&#8221;&#8216;\/private\/var\/folders\/9p\/wbk1ypzs5rv35d01phw8hvym0000gn\/T\/pip-install-55q_e669\/mysqlclient\/setup.py'&#8221;&#8216;&#8221;&#8216;;f=getattr(tokenize, &#8216;&#8221;&#8216;&#8221;&#8216;open'&#8221;&#8216;&#8221;&#8216;, open)(<strong>file<\/strong>);code=f.read().replace(&#8216;&#8221;&#8216;&#8221;&#8216;\\r\\n'&#8221;&#8216;&#8221;&#8216;, &#8216;&#8221;&#8216;&#8221;&#8216;\\n'&#8221;&#8216;&#8221;&#8216;);f.close();exec(compile(code, <strong>file<\/strong>, &#8216;&#8221;&#8216;&#8221;&#8216;exec'&#8221;&#8216;&#8221;&#8216;))&#8217; install &#8211;record \/private\/var\/folders\/9p\/wbk1ypzs5rv35d01phw8hvym0000gn\/T\/pip-record-pe06rxml\/install-record.txt &#8211;single-version-externally-managed &#8211;compile<br>\n         cwd: \/private\/var\/folders\/9p\/wbk1ypzs5rv35d01phw8hvym0000gn\/T\/pip-install-55q_e669\/mysqlclient\/<br>\n    Complete output (30 lines):<br>\n    running install<br>\n    running build<br>\n    running build_py<br>\n    creating build<br>\n    creating build\/lib.macosx-10.9-x86_64-3.7<br>\n    creating build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb<br>\n    copying MySQLdb\/<strong>init<\/strong>.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb<br>\n    copying MySQLdb\/<em>exceptions.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\n    copying MySQLdb\/compat.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\n    copying MySQLdb\/connections.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\n    copying MySQLdb\/converters.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\n    copying MySQLdb\/cursors.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\n    copying MySQLdb\/release.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\n    copying MySQLdb\/times.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\n    creating build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/<strong>init<\/strong>.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/CLIENT.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/CR.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/ER.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/FIELD_TYPE.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/FLAG.py -&gt; build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\/constants\n    running build_ext\n            <\/em><em>\n    building &#8216;MySQLdb._mysql&#8217; extension\n    ],\n    creating build\/temp.macosx-10.9-x86_64-3.7\n    creating build\/temp.macosx-10.9-x86_64-3.7\/MySQLdb\n    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Dversion_info=(1,4,4,&#8217;final&#8217;,0) -D__version_<\/em>=1.4.4 -I\/usr\/local\/opt\/mysql@5.7\/include\/mysql -I\/Library\/Frameworks\/Python.framework\/Versions\/3.7\/include\/python3.7m -c MySQLdb\/_mysql.c -o build\/temp.macosx-10.9-x86_64-3.7\/MySQLdb\/_mysql.o<br>\n    gcc -bundle -undefined dynamic_lookup -arch x86_64 -g build\/temp.macosx-10.9-x86_64-3.7\/MySQLdb\/_mysql.o -L\/usr\/local\/opt\/mysql@5.7\/lib -lmysqlclient -lssl -lcrypto -o build\/lib.macosx-10.9-x86_64-3.7\/MySQLdb\/_mysql.cpython-37m-darwin.so<br>\n    ld: library not found for -lssl<br>\n    clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>\n    error: command &#8216;gcc&#8217; failed with exit status 1<br>\n    &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br>\nERROR: Command errored out with exit status 1: \/Library\/Frameworks\/Python.framework\/Versions\/3.7\/bin\/python3.7 -u -c &#8216;import sys, setuptools, tokenize; sys.argv[0] = &#8216;&#8221;&#8216;&#8221;&#8216;\/private\/var\/folders\/9p\/wbk1ypzs5rv35d01phw8hvym0000gn\/T\/pip-install-55q_e669\/mysqlclient\/setup.py'&#8221;&#8216;&#8221;&#8216;; <strong>file<\/strong>='&#8221;&#8216;&#8221;&#8216;\/private\/var\/folders\/9p\/wbk1ypzs5rv35d01phw8hvym0000gn\/T\/pip-install-55q_e669\/mysqlclient\/setup.py'&#8221;&#8216;&#8221;&#8216;;f=getattr(tokenize, &#8216;&#8221;&#8216;&#8221;&#8216;open'&#8221;&#8216;&#8221;&#8216;, open)(<strong>file<\/strong>);code=f.read().replace(&#8216;&#8221;&#8216;&#8221;&#8216;\\r\\n'&#8221;&#8216;&#8221;&#8216;, &#8216;&#8221;&#8216;&#8221;&#8216;\\n'&#8221;&#8216;&#8221;&#8216;);f.close();exec(compile(code, <strong>file<\/strong>, &#8216;&#8221;&#8216;&#8221;&#8216;exec'&#8221;&#8216;&#8221;&#8216;))&#8217; install &#8211;record \/private\/var\/folders\/9p\/wbk1ypzs5rv35d01phw8hvym0000gn\/T\/pip-record-pe06rxml\/install-record.txt &#8211;single-version-externally-managed &#8211;compile Check the logs for full command output.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u51fa\u73b0\u5f02\u5e38\u62a5\u9519\u662f\u56e0\u4e3a\u6ca1\u6709\u627e\u5230\u7cfb\u7edf\u7684\u5e93\u6587\u4ef6\uff0c\u6dfb\u52a0\u4e00\u4e0b\u53d8\u91cf\nenv LDFLAGS=\"-I\/usr\/local\/opt\/openssl\/include -L\/usr\/local\/opt\/openssl\/lib\" pip install mysqlclient<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Collecting mysqlclient Using cached http &hellip; <a href=\"https:\/\/blog.espnlol.com\/?p=465\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-465","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/posts\/465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=465"}],"version-history":[{"count":1,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/posts\/465\/revisions"}],"predecessor-version":[{"id":466,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/posts\/465\/revisions\/466"}],"wp:attachment":[{"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}