{"id":2369,"date":"2016-11-25T14:34:41","date_gmt":"2016-11-25T06:34:41","guid":{"rendered":"https:\/\/boweihe.me\/?p=2369"},"modified":"2016-11-25T14:34:41","modified_gmt":"2016-11-25T06:34:41","slug":"windows-%e4%b8%8b%e4%bd%bf%e7%94%a8mingw%e7%bc%96%e8%af%91cython","status":"publish","type":"post","link":"https:\/\/dayandcarrot.space\/?p=2369","title":{"rendered":"Windows \u4e0b\u4f7f\u7528MinGW\u7f16\u8bd1Cython"},"content":{"rendered":"<p>\u7528Visual C++\u7f16\u8bd1\u5668\u4e5f\u662f\u53ef\u4ee5\u7684(\u627e\u4e0d\u5230vcvarsall.bat\u53ef\u4ee5<a href=\"http:\/\/stackoverflow.com\/questions\/2817869\/error-unable-to-find-vcvarsall-bat\" target=\"_blank\" rel=\"noopener noreferrer\">\u770b\u8fd9\u7bc7<\/a>)\uff0c\u4e0d\u8fc7\u4e3a\u4e86\u540e\u9762\u79fb\u690d\u65b9\u4fbf\uff0c\u76ee\u524d\u7684\u9879\u76ee\u8fd8\u662f\u7528MinGW.<br \/>\n\u6b65\u9aa4\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u53c2\u8003<a href=\"http:\/\/cython.readthedocs.io\/en\/latest\/src\/tutorial\/appendix.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/cython.readthedocs.io\/en\/latest\/src\/tutorial\/appendix.html<\/a>\u3002<br \/>\n\u7a0d\u5fae\u7ffb\u8bd1\u4e00\u4e0b\u5c31\u662f\uff1a<\/p>\n<ol>\n<li>\u4ece\u8fd9\u91cc<a href=\"http:\/\/www.mingw.org\/wiki\/HOWTO_Install_the_MinGW_GCC_Compiler_Suite\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.mingw.org\/wiki\/HOWTO_Install_the_MinGW_GCC_Compiler_Suite<\/a>\u00a0\u4e0b\u8f7d\u4e2aMinGW Installer. \u4e0b\u8f7d\u3001\u5b89\u88c5\u7684\u65f6\u5019\u8bb0\u4f4f\u662f32\u4f4d\u7248\u672c\u7684\uff0c\u56e0\u4e3a64\u4f4d\u7248\u4ecd\u65e7\u6709\u4e9b\u4e0d\u517c\u5bb9\u73b0\u8c61\u3002<\/li>\n<li>\u8fd0\u884c\u5b89\u88c5\u4e0b\u8f7d\u7684\u7a0b\u5e8f\u3002Cython\u53ea\u9700\u8981\u6700\u57fa\u672c\u7684\u5305(basic package)\u5c31\u884c\u4e86\uff0c\u4e3b\u8981\u662f\u4e3a\u4e86\u91cc\u9762\u7684C++\u7f16\u8bd1\u5668<\/li>\n<li>\u5c06\u4f60\u5b89\u88c5MinGW\u7684\u76ee\u5f55\u8bbe\u7f6e\u5230PATH\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u9ed8\u8ba4\u4f4d\u7f6e\u5e94\u8be5\u662fC:\\MinGW\\bin<\/li>\n<li>\u5728Python\u5b89\u88c5\u76ee\u5f55\u4e0b\u521b\u5efa\u914d\u7f6e\u6587\u4ef6\u3002\u5982\u679cPython\u662f\u5b89\u88c5\u5728C:\\Python27\u76ee\u5f55\u4e0b\uff0c\u90a3\u5c31\u521b\u5efaC:\\Python27\\Lib\\distutils\\distutils.cfg\uff0c\u7136\u540e\u6587\u4ef6\u5185\u5bb9\u4e3a\n<pre class=\"lang:default decode:true \">[build]\ncompiler = mingw32<\/pre>\n<p>&nbsp;<\/li>\n<\/ol>\n<p>\u8fd9\u6837\u5c31\u53ef\u4ee5\u4f7f\u7528GCC\u7f16\u8bd1\u5566~<br \/>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7528Visual C++\u7f16\u8bd1\u5668\u4e5f\u662f\u53ef\u4ee5\u7684(\u627e\u4e0d\u5230vcvarsall.bat\u53ef\u4ee5\u770b\u8fd9\u7bc7)\uff0c\u4e0d\u8fc7\u4e3a\u4e86\u540e\u9762\u79fb\u690d\u65b9\u4fbf\uff0c\u76ee\u524d\u7684\u9879\u76ee\u8fd8\u662f\u7528MinGW. \u6b65\u9aa4\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u53c2\u8003http:\/\/cython.readthedocs.io\/en\/latest\/src\/tutorial\/appendix.html\u3002 \u7a0d\u5fae\u7ffb\u8bd1\u4e00\u4e0b\u5c31\u662f\uff1a \u4ece\u8fd9\u91cchttp:\/\/www.mingw.org\/wiki\/HOWTO_Install_the_MinGW_GCC_Compiler_Suite\u00a0\u4e0b\u8f7d\u4e2aMinGW Installer. \u4e0b\u8f7d\u3001\u5b89\u88c5\u7684\u65f6\u5019\u8bb0\u4f4f\u662f32\u4f4d\u7248\u672c\u7684\uff0c\u56e0\u4e3a64\u4f4d\u7248\u4ecd\u65e7\u6709\u4e9b\u4e0d\u517c\u5bb9\u73b0\u8c61\u3002 \u8fd0\u884c\u5b89\u88c5\u4e0b\u8f7d\u7684\u7a0b\u5e8f\u3002Cython\u53ea\u9700\u8981\u6700\u57fa\u672c\u7684\u5305(basic package)\u5c31\u884c\u4e86\uff0c\u4e3b\u8981\u662f\u4e3a\u4e86\u91cc\u9762\u7684C++\u7f16\u8bd1\u5668 \u5c06\u4f60\u5b89\u88c5MinGW\u7684\u76ee\u5f55\u8bbe\u7f6e\u5230PATH\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u9ed8\u8ba4\u4f4d\u7f6e\u5e94\u8be5\u662fC:\\MinGW\\bin \u5728Python\u5b89\u88c5\u76ee\u5f55\u4e0b\u521b\u5efa\u914d\u7f6e\u6587\u4ef6\u3002\u5982\u679cPython\u662f\u5b89\u88c5\u5728C:\\Python27\u76ee\u5f55\u4e0b\uff0c\u90a3\u5c31\u521b\u5efaC:\\Python27\\Lib\\distutils\\distutils.cfg\uff0c\u7136\u540e\u6587\u4ef6\u5185\u5bb9\u4e3a [build] compiler = mingw32 &nbsp; \u8fd9\u6837\u5c31\u53ef\u4ee5\u4f7f\u7528GCC\u7f16\u8bd1\u5566~ &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[74,89],"class_list":["post-2369","post","type-post","status-publish","format-standard","hentry","category-technical","tag-mingw","tag-python"],"_links":{"self":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts\/2369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2369"}],"version-history":[{"count":0,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=\/wp\/v2\/posts\/2369\/revisions"}],"wp:attachment":[{"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dayandcarrot.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}