{"id":1152862,"date":"2025-01-13T17:31:07","date_gmt":"2025-01-13T09:31:07","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1152862.html"},"modified":"2025-01-13T17:31:10","modified_gmt":"2025-01-13T09:31:10","slug":"%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85glove_python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1152862.html","title":{"rendered":"\u5982\u4f55\u5b89\u88c5glove_python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25182740\/da2e1633-a65d-4185-9d00-d07d89cb1f74.webp\" alt=\"\u5982\u4f55\u5b89\u88c5glove_python\" \/><\/p>\n<p><p> \u5b89\u88c5GloVe-python\u5e93\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<strong>\u5b89\u88c5\u524d\u51c6\u5907\u3001\u5b89\u88c5GloVe-python\u5e93\u3001\u914d\u7f6e\u76f8\u5173\u4f9d\u8d56\u3001\u6d4b\u8bd5\u5b89\u88c5<\/strong>\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u6b65\u9aa4\u4e2d\u7684\u6bcf\u4e00\u4e2a\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5\u524d\u51c6\u5907<\/h3>\n<\/p>\n<p><p>\u5728\u5b89\u88c5GloVe-python\u5e93\u4e4b\u524d\uff0c\u5efa\u8bae\u5148\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u73af\u5883\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u548cpip\u3002GloVe-python\u5e93\u662f\u57fa\u4e8ePython\u7684\uff0c\u56e0\u6b64\u9700\u8981\u4e00\u4e2a\u7a33\u5b9a\u7684Python\u73af\u5883\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u548cpip\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python --version<\/p>\n<p>pip --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u5c1a\u672a\u5b89\u88c5\uff0c\u53ef\u4ee5\u4ece<a href=\"https:\/\/www.python.org\/\">Python\u5b98\u65b9\u7f51\u7ad9<\/a>\u4e0b\u8f7d\u5e76\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684Python\uff0c\u540c\u65f6\u4e5f\u4f1a\u81ea\u52a8\u5b89\u88c5pip\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u5b89\u88c5GloVe-python\u5e93<\/h3>\n<\/p>\n<p><p>GloVe-python\u5e93\u53ef\u4ee5\u901a\u8fc7pip\u5b89\u88c5\uff0c\u5177\u4f53\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install glove-python-binary<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u662f\u5b89\u88c5GloVe-python\u5e93\u7684\u6700\u7b80\u5355\u65b9\u5f0f\u3002\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662fPython 3\uff0c\u53ef\u4ee5\u786e\u4fddpip\u548cPython\u7248\u672c\u4e00\u81f4\uff0c\u4f8b\u5982\u4f7f\u7528<code>pip3<\/code>\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip3 install glove-python-binary<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u914d\u7f6e\u76f8\u5173\u4f9d\u8d56<\/h3>\n<\/p>\n<p><p>\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u914d\u7f6e\u4e00\u4e9b\u989d\u5916\u7684\u4f9d\u8d56\u9879\u3002GloVe-python\u5e93\u4f9d\u8d56\u4e8e\u4e00\u4e9bC++\u7f16\u8bd1\u5de5\u5177\u548c\u5e93\uff0c\u56e0\u6b64\u5728\u5b89\u88c5\u524d\u9700\u8981\u786e\u4fdd\u8fd9\u4e9b\u5de5\u5177\u5df2\u7ecf\u5b89\u88c5\u5728\u7cfb\u7edf\u4e2d\u3002<\/p>\n<\/p>\n<p><h4>1. \u5728Windows\u7cfb\u7edf\u4e0a\uff1a<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5Microsoft Visual C++ Build Tools\uff0c\u5177\u4f53\u53ef\u53c2\u8003<a href=\"https:\/\/visualstudio.microsoft.com\/visual-cpp-build-tools\/\">\u5b98\u65b9\u6587\u6863<\/a>\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u786e\u4fdd\u5c06\u5176\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<p><h4>2. \u5728Linux\u7cfb\u7edf\u4e0a\uff1a<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5b89\u88c5\u6240\u9700\u7684\u7f16\u8bd1\u5de5\u5177\uff0c\u4f8b\u5982\u5728Ubuntu\u7cfb\u7edf\u4e0a\uff0c\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt-get update<\/p>\n<p>sudo apt-get install build-essential<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u5728macOS\u7cfb\u7edf\u4e0a\uff1a<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528Homebrew\u5b89\u88c5\u76f8\u5173\u5de5\u5177\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">brew install gcc<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u6d4b\u8bd5\u5b89\u88c5<\/h3>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u7b80\u5355\u7684\u4ee3\u7801\u6d4b\u8bd5GloVe-python\u5e93\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from glove import Corpus, Glove<\/p>\n<h2><strong>Create a corpus from a list of sentences<\/strong><\/h2>\n<p>sentences = [[&#39;this&#39;, &#39;is&#39;, &#39;a&#39;, &#39;sample&#39;], [&#39;this&#39;, &#39;is&#39;, &#39;another&#39;, &#39;example&#39;]]<\/p>\n<p>corpus = Corpus()<\/p>\n<p>corpus.fit(sentences, window=10)<\/p>\n<h2><strong>Create a GloVe model and tr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n it<\/strong><\/h2>\n<p>glove = Glove(no_components=100, learning_rate=0.05)<\/p>\n<p>glove.fit(corpus.matrix, epochs=30, no_threads=4, verbose=True)<\/p>\n<p>glove.add_dictionary(corpus.dictionary)<\/p>\n<h2><strong>Save the model<\/strong><\/h2>\n<p>glove.save(&#39;glove.model&#39;)<\/p>\n<h2><strong>Load the model<\/strong><\/h2>\n<p>glove = Glove.load(&#39;glove.model&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u4e0a\u8ff0\u4ee3\u7801\u8fd0\u884c\u6ca1\u6709\u62a5\u9519\uff0c\u8bf4\u660eGloVe-python\u5e93\u5df2\u7ecf\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001GloVe-python\u5e93\u7684\u6df1\u5165\u4f7f\u7528<\/h3>\n<\/p>\n<p><h4>1. \u6784\u5efa\u8bed\u6599\u5e93<\/h4>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u901a\u5e38\u9700\u8981\u4ece\u5927\u91cf\u6587\u672c\u6570\u636e\u4e2d\u6784\u5efa\u8bed\u6599\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7<code>Corpus<\/code>\u7c7b\u6765\u6784\u5efa\u8bed\u6599\u5e93\uff0c\u5e76\u8bbe\u7f6e\u7a97\u53e3\u5927\u5c0f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from glove import Corpus<\/p>\n<h2><strong>\u5047\u8bbe\u4f60\u6709\u4e00\u4e2a\u5305\u542b\u5927\u91cf\u53e5\u5b50\u7684\u5217\u8868<\/strong><\/h2>\n<p>sentences = [[&#39;this&#39;, &#39;is&#39;, &#39;a&#39;, &#39;sample&#39;], [&#39;another&#39;, &#39;sentence&#39;, &#39;goes&#39;, &#39;here&#39;]]<\/p>\n<p>corpus = Corpus()<\/p>\n<p>corpus.fit(sentences, window=10)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u8bad\u7ec3GloVe\u6a21\u578b<\/h4>\n<\/p>\n<p><p>GloVe\u6a21\u578b\u7684\u8bad\u7ec3\u9700\u8981\u8bbe\u7f6e\u4e00\u4e9b\u53c2\u6570\uff0c\u4f8b\u5982\u5411\u91cf\u7684\u7ef4\u5ea6\u3001\u5b66\u4e60\u7387\u3001\u8bad\u7ec3\u7684\u8fed\u4ee3\u6b21\u6570\u7b49\u3002\u53ef\u4ee5\u901a\u8fc7<code>Glove<\/code>\u7c7b\u6765\u5b9e\u73b0\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from glove import Glove<\/p>\n<p>glove = Glove(no_components=100, learning_rate=0.05)<\/p>\n<p>glove.fit(corpus.matrix, epochs=30, no_threads=4, verbose=True)<\/p>\n<p>glove.add_dictionary(corpus.dictionary)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u4fdd\u5b58\u548c\u52a0\u8f7d\u6a21\u578b<\/h4>\n<\/p>\n<p><p>\u8bad\u7ec3\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5c06\u6a21\u578b\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\uff0c\u4ee5\u4fbf\u540e\u7eed\u52a0\u8f7d\u548c\u4f7f\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4fdd\u5b58\u6a21\u578b<\/p>\n<p>glove.save(&#39;glove.model&#39;)<\/p>\n<h2><strong>\u52a0\u8f7d\u6a21\u578b<\/strong><\/h2>\n<p>glove = Glove.load(&#39;glove.model&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4. \u4f7f\u7528GloVe\u6a21\u578b<\/h4>\n<\/p>\n<p><p>\u52a0\u8f7d\u6a21\u578b\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u6a21\u578b\u8fdb\u884c\u5404\u79cd\u64cd\u4f5c\uff0c\u4f8b\u5982\u67e5\u627e\u8bcd\u5411\u91cf\u3001\u8ba1\u7b97\u8bcd\u4e4b\u95f4\u7684\u76f8\u4f3c\u5ea6\u7b49\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u67e5\u627e\u8bcd\u5411\u91cf<\/p>\n<p>vector = glove.word_vectors[glove.dictionary[&#39;sample&#39;]]<\/p>\n<h2><strong>\u8ba1\u7b97\u8bcd\u4e4b\u95f4\u7684\u76f8\u4f3c\u5ea6<\/strong><\/h2>\n<p>similarity = glove.most_similar(&#39;sample&#39;, number=10)<\/p>\n<p>print(similarity)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u51b3<\/h3>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u548c\u4f7f\u7528GloVe-python\u5e93\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5\u5931\u8d25<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9047\u5230\u7f16\u8bd1\u9519\u8bef\uff0c\u53ef\u4ee5\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86\u5fc5\u8981\u7684\u7f16\u8bd1\u5de5\u5177\u3002\u4f8b\u5982\uff0c\u5728Windows\u4e0a\uff0c\u9700\u8981\u786e\u4fdd\u5b89\u88c5\u4e86Microsoft Visual C++ Build Tools\u3002<\/p>\n<\/p>\n<p><h4>2. \u4f9d\u8d56\u9879\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u9047\u5230\u4f9d\u8d56\u9879\u76f8\u5173\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u66f4\u65b0pip\uff0c\u5e76\u91cd\u65b0\u5b89\u88c5GloVe-python\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install --upgrade pip<\/p>\n<p>pip install glove-python-binary<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u517c\u5bb9\u6027\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u9047\u5230\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u4e0d\u540c\u7248\u672c\u7684Python\u548cGloVe-python\u5e93\u3002\u4f8b\u5982\uff0c\u67d0\u4e9b\u7248\u672c\u7684GloVe-python\u5e93\u53ef\u80fd\u4e0e\u7279\u5b9a\u7248\u672c\u7684Python\u4e0d\u517c\u5bb9\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u6269\u5c55\u9605\u8bfb<\/h3>\n<\/p>\n<p><p>GloVe\uff08Global Vectors for Word Representation\uff09\u662f\u7531\u65af\u5766\u798f\u5927\u5b66\u7684\u7814\u7a76\u4eba\u5458\u63d0\u51fa\u7684\u4e00\u79cd\u8bcd\u5411\u91cf\u8868\u793a\u65b9\u6cd5\u3002\u76f8\u6bd4\u4e8e\u4f20\u7edf\u7684\u8bcd\u5411\u91cf\u6a21\u578b\uff08\u4f8b\u5982Word2Vec\uff09\uff0cGloVe\u6a21\u578b\u901a\u8fc7\u7ed3\u5408\u5c40\u90e8\u4e0a\u4e0b\u6587\u4fe1\u606f\u548c\u5168\u5c40\u7edf\u8ba1\u4fe1\u606f\uff0c\u80fd\u591f\u66f4\u597d\u5730\u6355\u6349\u8bcd\u4e0e\u8bcd\u4e4b\u95f4\u7684\u5173\u7cfb\u3002<\/p>\n<\/p>\n<p><h4>1. GloVe\u6a21\u578b\u7684\u57fa\u672c\u539f\u7406<\/h4>\n<\/p>\n<p><p>GloVe\u6a21\u578b\u7684\u57fa\u672c\u601d\u60f3\u662f\u901a\u8fc7\u6784\u5efa\u8bcd\u5171\u73b0\u77e9\u9635\uff0c\u5e76\u5bf9\u5176\u8fdb\u884c\u77e9\u9635\u5206\u89e3\uff0c\u4ece\u800c\u5f97\u5230\u8bcd\u5411\u91cf\u3002\u5728\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\uff0cGloVe\u6a21\u578b\u4f1a\u4f18\u5316\u4e00\u4e2a\u76ee\u6807\u51fd\u6570\uff0c\u4f7f\u5f97\u8bcd\u5411\u91cf\u80fd\u591f\u51c6\u786e\u5730\u53cd\u6620\u8bcd\u4e0e\u8bcd\u4e4b\u95f4\u7684\u5171\u73b0\u5173\u7cfb\u3002<\/p>\n<\/p>\n<p><h4>2. GloVe\u6a21\u578b\u7684\u5e94\u7528<\/h4>\n<\/p>\n<p><p>GloVe\u6a21\u578b\u5728\u81ea\u7136\u8bed\u8a00\u5904\u7406\u9886\u57df\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u4f8b\u5982\u6587\u672c\u5206\u7c7b\u3001\u60c5\u611f\u5206\u6790\u3001\u673a\u5668\u7ffb\u8bd1\u7b49\u3002\u901a\u8fc7\u5c06\u6587\u672c\u6570\u636e\u8f6c\u6362\u4e3a\u8bcd\u5411\u91cf\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u63d0\u9ad8\u5404\u79cd\u81ea\u7136\u8bed\u8a00\u5904\u7406\u4efb\u52a1\u7684\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><h4>3. GloVe\u6a21\u578b\u7684\u4f18\u5316<\/h4>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574GloVe\u6a21\u578b\u7684\u53c2\u6570\uff08\u4f8b\u5982\u5411\u91cf\u7ef4\u5ea6\u3001\u5b66\u4e60\u7387\u3001\u7a97\u53e3\u5927\u5c0f\u7b49\uff09\u6765\u4f18\u5316\u6a21\u578b\u7684\u6027\u80fd\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u7ed3\u5408\u5176\u4ed6\u6280\u672f\uff08\u4f8b\u5982\u6df1\u5ea6\u5b66\u4e60\u3001\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u7b49\uff09\u6765\u8fdb\u4e00\u6b65\u63d0\u5347\u6a21\u578b\u7684\u6548\u679c\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\u548c\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u4f60\u5e94\u8be5\u80fd\u591f\u987a\u5229\u5730\u5b89\u88c5\u548c\u4f7f\u7528GloVe-python\u5e93\u3002<strong>\u5b89\u88c5\u524d\u51c6\u5907\u3001\u5b89\u88c5GloVe-python\u5e93\u3001\u914d\u7f6e\u76f8\u5173\u4f9d\u8d56\u3001\u6d4b\u8bd5\u5b89\u88c5<\/strong>\u662f\u786e\u4fdd\u5b89\u88c5\u6210\u529f\u7684\u5173\u952e\u6b65\u9aa4\u3002\u540c\u65f6\uff0c\u6df1\u5165\u7406\u89e3GloVe\u6a21\u578b\u7684\u57fa\u672c\u539f\u7406\u548c\u5e94\u7528\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u5229\u7528GloVe-python\u5e93\u8fdb\u884c\u5404\u79cd\u81ea\u7136\u8bed\u8a00\u5904\u7406\u4efb\u52a1\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5b89\u88c5glove_python\u7684\u4f9d\u8d56\u9879\uff1f<\/strong><br \/>\u5728\u5b89\u88c5glove_python\u4e4b\u524d\uff0c\u786e\u4fdd\u60a8\u7684\u73af\u5883\u4e2d\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u548cpip\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5\u6240\u9700\u7684\u4f9d\u8d56\u9879\uff1a  <\/p>\n<pre><code class=\"language-bash\">pip install numpy scipy\n<\/code><\/pre>\n<p>\u6b64\u5916\uff0c\u60a8\u8fd8\u9700\u8981\u5b89\u88c5Cython\uff0c\u8fd9\u5bf9\u4e8e\u7f16\u8bd1\u67d0\u4e9b\u6a21\u5757\u662f\u5fc5\u8981\u7684\uff1a  <\/p>\n<pre><code class=\"language-bash\">pip install cython\n<\/code><\/pre>\n<p><strong>glove_python\u652f\u6301\u54ea\u4e9bPython\u7248\u672c\uff1f<\/strong><br \/>glove_python\u901a\u5e38\u652f\u6301Python 3.x\u7248\u672c\u3002\u5728\u9009\u62e9Python\u7248\u672c\u65f6\uff0c\u786e\u4fdd\u4f7f\u7528\u66f4\u65b0\u7684\u7248\u672c\uff0c\u4ee5\u83b7\u5f97\u66f4\u597d\u7684\u6027\u80fd\u548c\u652f\u6301\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c<code>python --version<\/code>\u547d\u4ee4\u6765\u68c0\u67e5\u60a8\u5f53\u524d\u7684Python\u7248\u672c\u3002<\/p>\n<p><strong>\u5b89\u88c5glove_python\u540e\uff0c\u5982\u4f55\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\uff1f<\/strong><br \/>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u5728Python\u73af\u5883\u4e2d\u5bfc\u5165glove_python\u6765\u68c0\u67e5\u5b89\u88c5\u60c5\u51b5\u3002\u6253\u5f00Python\u89e3\u91ca\u5668\u5e76\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a  <\/p>\n<pre><code class=\"language-python\">import glove\nprint(glove.__version__)\n<\/code><\/pre>\n<p>\u5982\u679c\u6ca1\u6709\u51fa\u73b0\u9519\u8bef\uff0c\u5e76\u4e14\u6210\u529f\u6253\u5370\u51fa\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002\u60a8\u8fd8\u53ef\u4ee5\u8fd0\u884c\u4e00\u4e9b\u793a\u4f8b\u4ee3\u7801\uff0c\u786e\u4fdd\u5e93\u529f\u80fd\u6b63\u5e38\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5b89\u88c5GloVe-python\u5e93\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a\u5b89\u88c5\u524d\u51c6\u5907\u3001\u5b89\u88c5GloVe-python\u5e93\u3001\u914d\u7f6e\u76f8\u5173\u4f9d\u8d56\u3001 [&hellip;]","protected":false},"author":3,"featured_media":1152865,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1152862"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1152862"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1152862\/revisions"}],"predecessor-version":[{"id":1152866,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1152862\/revisions\/1152866"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1152865"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1152862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1152862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1152862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}