{"id":204548,"date":"2025-05-29T14:02:27","date_gmt":"2025-05-29T06:02:27","guid":{"rendered":"https:\/\/server.hk\/cnblog\/204548\/"},"modified":"2025-05-29T14:02:27","modified_gmt":"2025-05-29T06:02:27","slug":"linux-%e4%b8%8a%e5%ae%89%e8%a3%85-python-levenshtein-%e5%ba%93%e9%81%87%e5%88%b0%e9%94%99%e8%af%af%ef%bc%9a%e7%bc%ba%e5%b0%91-gcc-%e4%be%9d%e8%b5%96%e9%a1%b9%ef%bc%8c%e5%a6%82%e4%bd%95%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/204548\/","title":{"rendered":"Linux \u4e0a\u5b89\u88c5 Python Levenshtein \u5e93\u9047\u5230\u9519\u8bef\uff1a\u7f3a\u5c11 GCC \u4f9d\u8d56\u9879\uff0c\u5982\u4f55\u89e3\u51b3\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>Linux \u4e0a\u5b89\u88c5 Python Levenshtein \u5e93\u9047\u5230\u9519\u8bef\uff1a\u7f3a\u5c11 GCC \u4f9d\u8d56\u9879\uff0c\u5982\u4f55\u89e3\u51b3\uff1f<\/h1>\n<p>\u5bf9\u4e8e\u4e00\u4e2a\u6587\u7ae0\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u7262\u56fa\u624e\u5b9e\u7684\u57fa\u7840\u662f\u5341\u5206\u91cd\u8981\u7684\uff0c\u5c31\u6765\u5e26\u5927\u5bb6\u4e00\u70b9\u70b9\u7684\u638c\u63e1\u57fa\u7840\u77e5\u8bc6\u70b9\u3002\u4eca\u5929\u672c\u7bc7\u6587\u7ae0\u5e26\u5927\u5bb6\u4e86\u89e3\u300aLinux \u4e0a\u5b89\u88c5 Python Levenshtein \u5e93\u9047\u5230\u9519\u8bef\uff1a\u7f3a\u5c11 GCC \u4f9d\u8d56\u9879\uff0c\u5982\u4f55\u89e3\u51b3\uff1f\u300b\uff0c\u4e3b\u8981\u4ecb\u7ecd\u4e86\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u5feb\u70b9\u6536\u85cf\u8d77\u6765\u5427\uff0c\u5426\u5219\u9700\u8981\u65f6\u5c31\u627e\u4e0d\u5230\u4e86\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241110\/1731215734673041761b036.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong> \u5728 windows \u672c\u5730\u8ba1\u7b97\u673a\u4e0a\uff0c\u4f7f\u7528 whl \u65b9\u5f0f\u5b89\u88c5 python levenshtein \u5e93\u6210\u529f\u4e86\uff0c\u514b\u670d\u4e86 vc++ \u95ee\u9898\u3002\u4f46\u662f\uff0c\u5728\u4e0a\u8f7d\u5230 linux \u670d\u52a1\u5668\u540e\uff0c\u5b89\u88c5\u9047\u5230\u9519\u8bef\u3002<\/p>\n<p><strong>\u9519\u8bef\u4fe1\u606f\uff1a<\/strong><\/p>\n<pre>error: command errored out with exit status 1:\ncommand: \/yuwei\/anaconda3\/bin\/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&amp;quot;'&amp;quot;'\/tmp\/pip-install-_97ezszt\/python-levenshtein\/setup.py'&amp;quot;'&amp;quot;'; file='&amp;quot;'&amp;quot;'\/tmp\/pip-install-_97ezszt\/python-levenshtein\/setup.py'&amp;quot;'&amp;quot;';f=getattr(tokenize, '&amp;quot;'&amp;quot;'open'&amp;quot;'&amp;quot;', open)(file);code=f.read().replace('&amp;quot;'&amp;quot;'\\r\\n'&amp;quot;'&amp;quot;', '&amp;quot;'&amp;quot;'\\n'&amp;quot;'&amp;quot;');f.close();exec(compile(code, file, '&amp;quot;'&amp;quot;'exec'&amp;quot;'&amp;quot;'))' bdist_wheel -d \/tmp\/pip-wheel-cv8p0664\ncwd: \/tmp\/pip-install-_97ezszt\/python-levenshtein\/<\/pre>\n<p>\u8be5\u9519\u8bef\u662f\u7531\u4e8e\u7f3a\u5c11\u4f9d\u8d56\u9879\uff0c\u5373\u672a\u5b89\u88c5 gcc\uff08gnu \u7f16\u8bd1\u5668\u96c6\u5408\uff09\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u4f7f\u7528 yum \u5b89\u88c5 gcc\uff1a<\/p>\n<pre>yum install gcc<\/pre>\n<p>\u5b89\u88c5 gcc \u540e\uff0c\u91cd\u65b0\u5b89\u88c5 python levenshtein \u5e93\uff1a<\/p>\n<pre>pip install python-Levenshtein<\/pre>\n<p>\u6587\u4e2d\u5173\u4e8e\u7684\u77e5\u8bc6\u4ecb\u7ecd\uff0c\u5e0c\u671b\u5bf9\u4f60\u7684\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\uff01\u82e5\u662f\u53d7\u76ca\u532a\u6d45\uff0c\u90a3\u5c31\u52a8\u52a8\u9f20\u6807\u6536\u85cf\u8fd9\u7bc7\u300aLinux \u4e0a\u5b89\u88c5 Python Levenshtein \u5e93\u9047\u5230\u9519\u8bef\uff1a\u7f3a\u5c11 GCC \u4f9d\u8d56\u9879\uff0c\u5982\u4f55\u89e3\u51b3\uff1f\u300b\u6587\u7ae0\u5427\uff0c\u4e5f\u53ef\u5173\u6ce8\u516c\u4f17\u53f7\u4e86\u89e3\u76f8\u5173\u6280\u672f\u6587\u7ae0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux \u4e0a\u5b89\u88c5 Python&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-204548","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/204548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=204548"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/204548\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=204548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=204548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=204548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}