{"id":317,"date":"2024-02-11T00:20:12","date_gmt":"2022-12-10T10:21:21","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/index.php\/2023\/11\/30\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/"},"modified":"2025-08-01T21:39:33","modified_gmt":"2025-08-01T13:39:33","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/","title":{"rendered":"Ubuntu 22.04\u5b89\u88c5Poetry\uff1aPython\u4f9d\u8d56\u7ba1\u7406\u5b8c\u5168\u6307\u5357"},"content":{"rendered":"<h2>\u4ecb\u7ecd<\/h2>\n<p>Poetry\u662fPython\u7684\u4e00\u4e2a\u4f9d\u8d56\u7ba1\u7406\u5de5\u5177\uff0c\u8fd8\u80fd\u591f\u6784\u5efa\u548c\u6253\u5305\u7528\u4e8e\u5206\u53d1\u7684Python\u9879\u76ee\u3002\u4f5c\u4e3a\u4e00\u4e2a\u4f9d\u8d56\u7ba1\u7406\u5de5\u5177\uff0c\u5b83\u5177\u5907\u4fdd\u6301\u4e00\u81f4\u4e14\u72ec\u7acb\u7684\u865a\u62df\u73af\u5883\u7684\u5de5\u5177\u3002\u6b64\u5916\uff0c\u5b83\u8fd8\u63d0\u4f9b\u4e86\u4e0e\u5176\u4ed6\u5f62\u5f0f\u7684\u4f9d\u8d56\u7ba1\u7406\uff08\u5982requirements.txt\uff09\u96c6\u6210\u7684\u5de5\u5177\u3002<\/p>\n<p>\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u60a8\u5c06\u4f7f\u7528\u5b98\u65b9\u5b89\u88c5\u811a\u672c\u5b89\u88c5Poetry\uff0c\u8bbe\u7f6e\u4e00\u4e2a\u5e26\u6709\u865a\u62df\u73af\u5883\u7684Poetry\u9879\u76ee\uff0c\u7136\u540e\u6dfb\u52a0\u5e76\u5b89\u88c5\u60a8\u7684\u9879\u76ee\u4f9d\u8d56\u9879\u3002<\/p>\n<h2>\u524d\u63d0\u6761\u4ef6<\/h2>\n<ul class=\"post-ul\">\n<li>\u4e00\u53f0Ubuntu 22.04\u670d\u52a1\u5668\uff0c\u6839\u636e\u6211\u4eec\u7684Ubuntu 22.04\u521d\u59cb\u670d\u52a1\u5668\u8bbe\u7f6e\u6307\u5357\u8fdb\u884c\u8bbe\u7f6e\uff0c\u62e5\u6709\u4e00\u4e2a\u5177\u6709sudo\u6743\u9650\u7684\u975eroot\u7528\u6237\u548c\u5df2\u542f\u7528\u7684\u9632\u706b\u5899\u3002<\/li>\n<li>\u5728\u60a8\u7684\u673a\u5668\u4e0a\u5b89\u88c5\u4e86\u6700\u65b0\u7248\u672c\u7684Python 3\uff0c\u6309\u7167&#8221;\u5982\u4f55\u5728Ubuntu 22.04\u670d\u52a1\u5668\u4e0a\u5b89\u88c5Python 3\u5e76\u8bbe\u7f6e\u7f16\u7a0b\u73af\u5883&#8221;\u6559\u7a0b\u7684\u7b2c1\u6b65\u8fdb\u884c\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n<h2>\u7b2c\u4e00\u6b65 &#8211; \u5b89\u88c5Poetry<\/h2>\n<p>\u5728Poetry\u7f51\u7ad9\u4e0a\u63d0\u4f9b\u7684\u5b98\u65b9\u5b89\u88c5\u811a\u672c\u4e0a\u5b89\u88c5Poetry\u3002\u8be5\u547d\u4ee4\u5c06\u4e0b\u8f7d\u5b89\u88c5\u811a\u672c\uff0c\u7136\u540e\u5728\u60a8\u7684\u7cfb\u7edf\u4e0a\u8fd0\u884cPoetry\u7684\u5b89\u88c5\u3002\u5c3d\u7ba1\u8fd9\u4e2a\u6559\u7a0b\u662f\u9488\u5bf9Ubuntu 22.04\u670d\u52a1\u5668\u7684\uff0c\u4f46\u8fd9\u4e2a\u5b89\u88c5\u811a\u672c\u53ef\u4ee5\u5728Linux\u3001macOS\u548cWindows\u4e0a\u901a\u8fc7WSL\uff08Windows\u5b50\u7cfb\u7edf\uff09\u8fd0\u884c\uff0cWSL\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e2a\u6559\u7a0b\u5b89\u88c5\u3002\u8bf7\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\"><span class=\"token function\">curl<\/span> <span class=\"token parameter variable\">-sSL<\/span> https:\/\/install.python-poetry.org <span class=\"token operator\">|<\/span> python3 -\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>\u2026\r\n[secondary_label \u8f93\u51fa]\r\nPoetry (1.2.1) \u73b0\u5728\u5df2\u5b89\u88c5\u3002\u592a\u597d\u4e86\uff01\r\n\r\n\u8981\u5f00\u59cb\u4f7f\u7528\uff0c\u60a8\u9700\u8981\u5c06Poetry\u7684bin\u76ee\u5f55\uff08\/home\/<mark>sammy<\/mark>\/.local\/bin\uff09\u6dfb\u52a0\u5230\u60a8\u7684`PATH`\r\n\u73af\u5883\u53d8\u91cf\u4e2d\u3002\r\n\r\n\u5c06 `export PATH=\"\/home\/<mark>sammy<\/mark>\/.local\/bin:$PATH\"` \u6dfb\u52a0\u5230\u60a8\u7684shell\u914d\u7f6e\u6587\u4ef6\u4e2d\u3002\r\n\r\n\u6216\u8005\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 `\/home\/<mark>sammy<\/mark>\/.local\/bin\/poetry` \u663e\u5f0f\u8c03\u7528Poetry\u3002\r\n\u2026\r\n<\/code><\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0cPoetry\u4f1a\u63d0\u793a\u60a8\u5c06\u5176\u4e8c\u8fdb\u5236\u76ee\u5f55\u6dfb\u52a0\u5230PATH\u4e2d\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528Poetry\u3002\u5728Ubuntu\u7684Bash\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528nano\u6216\u60a8\u559c\u6b22\u7684\u6587\u672c\u7f16\u8f91\u5668\u6765\u6253\u5f00~\/.bashrc\u6587\u4ef6\u6765\u5b8c\u6210\u8fd9\u4e2a\u64cd\u4f5c\u3002<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\"><span class=\"token function\">nano<\/span> ~\/.bashrc\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<p>\u8bf7\u5c06\u4ee5\u4e0b\u4e00\u884c\u4ee3\u7801\u6dfb\u52a0\u5230\u6587\u4ef6\u672b\u5c3e\uff1a<\/p>\n<div>~\/.bashrc \u53ef\u4ee5\u88ab\u89e3\u91ca\u4e3a\u7528\u6237\u5bb6\u76ee\u5f55\u4e0b\u7684\u4e00\u4e2a\u9690\u85cf\u6587\u4ef6\uff0c\u5b83\u7528\u4e8e\u914d\u7f6eBash shell\u7684\u73af\u5883\u53d8\u91cf\u548c\u81ea\u5b9a\u4e49\u547d\u4ee4\u884c\u884c\u4e3a\u3002<\/div>\n<pre class=\"post-pre\"><code>. . .\r\nexport PATH=\"\/home\/<mark>sammy<\/mark>\/.local\/bin:$PATH\"\r\n<\/code><\/pre>\n<p>\u4fdd\u5b58\u5e76\u9000\u51fa\u6587\u4ef6\uff0c\u5728nano\u4e2d\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0bCTRL+X\u6765\u9000\u51fa\uff0cY\u6765\u4fdd\u5b58\u6240\u6709\u66f4\u6539\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u5c06\u8fd9\u4e9b\u66f4\u6539\u5e94\u7528\u5230\u60a8\u5f53\u524d\u7684\u4f1a\u8bdd\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\"><span class=\"token builtin class-name\">source<\/span> ~\/.bashrc\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<p>\u8981\u68c0\u67e5Poetry\u547d\u4ee4\u5df2\u7ecf\u53ef\u7528\uff0c\u8bf7\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u663e\u793a\u5f53\u524d\u7684Poetry\u7248\u672c\u3002<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\">poetry <span class=\"token parameter variable\">--version<\/span>\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code><div class=\"secondary-code-label\" title=\"\u8f93\u51fa\">Poetry (\u7248\u672c <mark>1.2.1<\/mark>)\r\n<\/div><\/code><\/pre>\n<p>\u73b0\u5728\u4f60\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u4e86Poetry\uff0c\u5e76\u4e14\u53ef\u4ee5\u5f00\u59cb\u8bbe\u7f6e\u4e00\u4e2aPoetry\u9879\u76ee\u4e86\u3002<\/p>\n<h2>\u6b65\u9aa42 \u2014\u2014 \u5efa\u7acb\u4e00\u4e2aPoetry\u9879\u76ee<\/h2>\n<p>\u9996\u5148\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Poetry\u9879\u76ee\u3002\u8be5\u9879\u76ee\u5c06\u5e26\u6709\u5728\u5b89\u88c5\u548c\u7ba1\u7406\u4f9d\u8d56\u9879\u65f6\u4f7f\u7528\u7684\u865a\u62df\u73af\u5883\u3002\u672c\u6559\u7a0b\u5c06\u4f7f\u7528\u9879\u76ee\u540d\u79f0sammy_poetry\uff0c\u4f46\u60a8\u53ef\u4ee5\u81ea\u7531\u9009\u62e9\u60a8\u559c\u6b22\u7684\u540d\u79f0\u3002<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\">poetry new <mark>sammy_poetry<\/mark>\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<p>\u63a5\u4e0b\u6765\uff0c\u8fdb\u5165\u4f60\u7684\u65b0\u9879\u76ee\u76ee\u5f55\uff1a<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\"><span class=\"token builtin class-name\">cd<\/span> sammy_poetry\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<p>\u60a8\u7684\u65b0Poetry\u9879\u76ee\u5df2\u7ecf\u521b\u5efa\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u5fc5\u8981\u7684\u6837\u677f\u6587\u4ef6\u3002\u8981\u67e5\u770b\u60a8\u65b0\u521b\u5efa\u7684\u9879\u76ee\u6587\u4ef6\uff0c\u8bf7\u4f7f\u7528&#8221;ls&#8221;\u547d\u4ee4\u3002<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\"><span class=\"token function\">ls<\/span>\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code><div class=\"secondary-code-label\" title=\"\u8f93\u51fa\">README.md  dist  pyproject.toml  sammy_poetry  tests\r\n<\/div><\/code><\/pre>\n<div class=\"post-conf-note\">\n<p class=\"post-note\">\u6ce8\u610f\uff1a<\/p>\n<div>\u5982\u679c\u60a8\u6709\u4e00\u4e2a\u73b0\u6709\u7684\u9879\u76ee\u60f3\u8981\u4f7f\u7528\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4e0d\u540c\u7684\u547d\u4ee4\u4f7fPoetry\u5c06\u5176\u8bc6\u522b\u4e3a\u4e00\u4e2a\u9879\u76ee\u3002\u5bfc\u822a\u5230\u60a8\u73b0\u6709\u9879\u76ee\u7684\u76ee\u5f55\uff0c\u7136\u540e\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/div>\n<pre class=\"post-pre\"><code>poetry init<\/code><\/pre>\n<div>\u8fd9\u5c06\u5728\u60a8\u73b0\u6709\u7684\u9879\u76ee\u4e2d\u521b\u5efa\u6240\u6709\u5fc5\u9700\u7684\u6587\u4ef6\uff0c\u5e76\u4e14\u60a8\u53ef\u4ee5\u6309\u7167\u672c\u6559\u7a0b\u7ee7\u7eed\u8fdb\u884c\uff0c\u5c31\u50cf\u5b83\u662f\u4e00\u4e2a\u65b0\u9879\u76ee\u4e00\u6837\u3002<\/div>\n<\/div>\n<h2>\u7b2c\u4e09\u6b65 \u2014 \u6dfb\u52a0\u4f9d\u8d56<\/h2>\n<p>\u5728\u60a8\u5f00\u59cb\u5411\u9879\u76ee\u4e2d\u6dfb\u52a0\u4f9d\u8d56\u4e4b\u524d\uff0c\u60a8\u9996\u5148\u9700\u8981\u68c0\u67e5\u5e76\u4e86\u89e3Poetry\u6240\u4f7f\u7528\u7684\u4fdd\u5b58\u4f9d\u8d56\u7684pyproject.toml\u6587\u4ef6\u3002\u5728\u60a8\u7684Poetry\u9879\u76ee\u76ee\u5f55\u4e2d\u4f1a\u6709\u4e00\u4e2a\u81ea\u52a8\u751f\u6210\u7684pyproject.toml\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u60a8\u4f9d\u8d56\u7684\u5217\u8868\u3002\u8bf7\u6253\u5f00\u5e76\u4f7f\u7528\u4ee5\u4e0b\u5185\u5bb9\u67e5\u770b\u548c\u68c0\u67e5\u5b83\uff1a<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\"><span class=\"token function\">nano<\/span> pyproject.toml\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<div>pyproject.toml \u662f\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u7528\u4e8e\u5b9a\u4e49Python\u9879\u76ee\u7684\u5143\u6570\u636e\u548c\u4f9d\u8d56\u5173\u7cfb\u3002<\/div>\n<pre class=\"post-pre\"><code><span class=\"token punctuation\">[<\/span><span class=\"token table class-name\">tool.poetry<\/span><span class=\"token punctuation\">]<\/span>\r\n<span class=\"token key property\">name<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token string\">\"sammy-poetry\"<\/span>\r\n<span class=\"token key property\">version<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token string\">\"0.1.0\"<\/span>\r\n<span class=\"token key property\">description<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token string\">\"\"<\/span>\r\n<span class=\"token key property\">authors<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">\"Your Name &lt;you@example.com&gt;\"<\/span><span class=\"token punctuation\">]<\/span>\r\n<span class=\"token key property\">readme<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token string\">\"README.md\"<\/span>\r\n<span class=\"token key property\">packages<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">{<\/span><span class=\"token key property\">include<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token string\">\"sammy_poetry\"<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">]<\/span>\r\n\r\n<span class=\"token punctuation\">[<\/span><span class=\"token table class-name\">tool.poetry.dependencies<\/span><span class=\"token punctuation\">]<\/span>\r\n<span class=\"token key property\">python<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token string\">\"^3.10\"<\/span>\r\n\r\n\r\n<span class=\"token punctuation\">[<\/span><span class=\"token table class-name\">build-system<\/span><span class=\"token punctuation\">]<\/span>\r\n<span class=\"token key property\">requires<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">\"poetry-core\"<\/span><span class=\"token punctuation\">]<\/span>\r\n<span class=\"token key property\">build-backend<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token string\">\"poetry.core.masonry.api\"<\/span>\r\n<\/code><\/pre>\n<p>\u9664\u4e86\u5217\u5728tool.poetry.dependencies\u4e0b\u7684\u4f9d\u8d56\u9879\u4e4b\u5916\uff0c\u8fd8\u6709\u5728tool.poetry\u4e0b\u7684\u5143\u6570\u636e\u3002\u8bf7\u968f\u610f\u81ea\u5b9a\u4e49\u8fd9\u4e9b\u5143\u6570\u636e\uff0c\u4f8b\u5982\u59d3\u540d\u3001\u7535\u5b50\u90ae\u4ef6\u548c\u9879\u76ee\u63cf\u8ff0\u3002build-system\u5757\u76ee\u524d\u5305\u542b\u6709\u5173Poetry\u5982\u4f55\u6784\u5efa\u60a8\u7684\u8f6f\u4ef6\u5305\u7684\u89c4\u8303\uff0c\u5e76\u4e14\u6682\u65f6\u53ef\u4ee5\u4fdd\u6301\u4e0d\u53d8\u3002<\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u4e00\u70b9\u662f\uff0c\u5c3d\u7ba1Python 3.10\u662f\u6700\u65b0\u7248\u672c\uff0c\u4f46\u5b83\u53ef\u80fd\u5bf9\u8d44\u6e90\u8981\u6c42\u8f83\u9ad8\uff0c\u8fd9\u53ef\u80fd\u4f1a\u6839\u636e\u7cfb\u7edf\u914d\u7f6e\u800c\u6210\u4e3a\u4e00\u4e2a\u95ee\u9898\u3002\u5927\u591a\u6570Python\u5e93\u6700\u4f4e\u53ea\u9700\u89813.8\u7248\u672c\u3002\u5982\u679c\u60a8\u5e0c\u671b\u66f4\u6539\u9879\u76ee\u6240\u4f7f\u7528\u7684Python\u7248\u672c\u4f5c\u4e3a\u4f9d\u8d56\uff0c\u8bf7\u5728\u672c\u6559\u7a0b\u7684\u7b2c4\u6b65\u4e2d\u4e86\u89e3\u7248\u672c\u4f9d\u8d56\u3002<\/p>\n<p>\u60a8\u7684\u9879\u76ee\u76ee\u524d\u53ea\u6709Python\u672c\u8eab\u8fd9\u4e00\u4e2a\u4f9d\u8d56\u9879\u3002Poetry\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u76f4\u63a5\u4e3a\u60a8\u7684\u9879\u76ee\u6dfb\u52a0\u65b0\u7684\u4f9d\u8d56\u9879\u3002\u901a\u8fc7\u4f7f\u7528&#8221;poetry add&#8221;\u547d\u4ee4\uff0cPoetry\u5c06\u4f1a\u5728\u60a8\u7684tool.poetry.dependencies\u533a\u5757\u4e2d\u6dfb\u52a0\u4f9d\u8d56\u9879\uff0c\u5e76\u540c\u65f6\u5b89\u88c5\u8be5\u4f9d\u8d56\u9879\u3002<\/p>\n<p>\u5728\u68c0\u67e5\u5b8c\u60a8\u7684 pyproject.toml \u6587\u4ef6\u540e\uff0c\u5173\u95ed\u60a8\u7684\u7f16\u8f91\u5668\u3002\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u60a8\u5c06\u628a\u6d41\u884c\u7684 Python HTTP \u5e93 requests \u6dfb\u52a0\u5230\u60a8\u7684\u9879\u76ee\u4f9d\u8d56\u4e2d\uff0c\u5e76\u4f7f\u7528 add \u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\u3002\u8fd9\u4e2a\u5e93\u5141\u8bb8\u60a8\u4f7f\u7528\u6700\u5c11\u7684\u6837\u677f\u4ee3\u7801\u53d1\u9001 HTTP \u8bf7\u6c42\uff0c\u5bf9\u4e8e\u901a\u8fc7 HTTP \u8fdb\u884c\u63a5\u53e3\u4ea4\u4e92\u7684\u5e94\u7528\u7a0b\u5e8f\u975e\u5e38\u6709\u7528\uff0c\u4f46\u5728\u6f14\u793a\u7684\u76ee\u7684\u4e0a\u4efb\u4f55\u5305\u90fd\u53ef\u4ee5\u3002\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\">poetry <span class=\"token function\">add<\/span> requests\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><div class=\"secondary-code-label\" title=\"\u8f93\u51fa\">\u8f93\u51fa\r\nCreating virtualenv sammy-poetry-i9Ouy_MV-py3.10 in \/home\/sammy\/.cache\/pypoetry\/virtualenvs\r\nUsing version ^2.28.1 for requests\r\n\r\nUpdating dependencies\r\nResolving dependencies... (0.3s)\r\n\r\nWriting lock file\r\n\r\nPackage operations: 5 installs, 0 updates, 0 removals\r\n\r\n  \u2022 Installing certifi (2022.9.24)\r\n  \u2022 Installing charset-normalizer (2.1.1)\r\n  \u2022 Installing idna (3.4)\r\n  \u2022 Installing urllib3 (1.26.12)\r\n  \u2022 Installing requests (2.28.1)\r\n<\/div><\/code><\/pre>\n<p>\u968f\u7740\u5c06\u4fe1\u606f\u6dfb\u52a0\u5230pyproject.toml\u6587\u4ef6\u5e76\u5b89\u88c5requests\uff0c&#8221;add&#8221;\u547d\u4ee4\u8fd8\u8d1f\u8d23\u521d\u59cb\u5316\u865a\u62df\u73af\u5883\u3002\u6b64\u5916\uff0crequests\u672c\u8eab\u8fd8\u6709\u5176\u4ed6\u4f9d\u8d56\u9879\u3002Poetry\u5728\u5b89\u88c5requests\u4e4b\u524d\u4f1a\u81ea\u52a8\u5b89\u88c5\u6240\u6709\u8fd9\u4e9b\u4f9d\u8d56\u9879\u3002<\/p>\n<p>\u60a8\u7684pyproject.toml\u6587\u4ef6\u5c06\u4f1a\u88ab\u66f4\u65b0\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<div>pyproject.toml\u7684\u6c49\u8bed\u7ffb\u8bd1\u662f\uff1apyproject.toml<\/div>\n<pre class=\"post-pre\"><code><span class=\"token punctuation\">.<\/span> <span class=\"token punctuation\">.<\/span> <span class=\"token punctuation\">.<\/span>\r\n<span class=\"token punctuation\">[<\/span><span class=\"token table class-name\">tool.poetry.dependencies<\/span><span class=\"token punctuation\">]<\/span>\r\n<span class=\"token key property\">python<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token string\">\"^3.10\"<\/span>\r\n<span class=\"token key property\">requests<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token string\">\"^2.28.1\"<\/span>\r\n<span class=\"token punctuation\">.<\/span> <span class=\"token punctuation\">.<\/span> <span class=\"token punctuation\">.<\/span>\r\n<\/code><\/pre>\n<p>\u8fd9\u786e\u4fdd\u4e86\u8bf7\u6c42\u59cb\u7ec8\u88ab\u5b89\u88c5\u3002^\u8868\u793a\u5b83\u5c06\u662f\u53ef\u4ee5\u5b89\u88c5\u7684\u6700\u4f4e\u53ef\u63a5\u53d7\u7248\u672c\uff0c\u5e76\u4e14\u66f4\u9ad8\u7684\u7248\u672c\u4e5f\u662f\u53ef\u4ee5\u63a5\u53d7\u7684\u3002<\/p>\n<h2>\u7b2c\u56db\u6b65 \u2014 \u79fb\u9664\u548c\u6392\u5e8f\u4f9d\u8d56\u5173\u7cfb<\/h2>\n<p>\u4e3a\u4e86\u4fdd\u6301\u60a8\u5f53\u524d\u5b89\u88c5\u7684\u4f9d\u8d56\u9879\u548c\u60a8\u5728pyproject.toml\u6587\u4ef6\u4e2d\u5217\u51fa\u7684\u4f9d\u8d56\u9879\u4e4b\u95f4\u7684\u4e00\u81f4\u6027\uff0cPoetry\u91c7\u7528\u4e86\u4e00\u4e2a\u9501\u5b9a\u6587\u4ef6\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0cPoetry\u76f4\u63a5\u4ece\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u8bfb\u53d6\uff0c\u8fd9\u610f\u5473\u7740\u76f4\u63a5\u7f16\u8f91pyproject.toml\u6587\u4ef6\u4ee5\u66f4\u6539\u4f9d\u8d56\u9879\u53ef\u80fd\u4f1a\u5bfc\u81f4\u4e00\u4e9b\u9519\u8bef\u6216\u8b66\u544a\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre class=\"post-pre\"><div class=\"secondary-code-label\" title=\"\u8f93\u51fa\">\u8f93\u51fa\r\n. . .\r\nWarning: poetry.lock is not consistent with pyproject.toml. You may be getting improper dependencies. Run `poetry lock [--no-update]` to fix it.\r\n. . .\r\n<\/div><\/code><\/pre>\n<p>\u56e0\u6b64\uff0c\u5982\u679c\u60a8\u9700\u8981\u5220\u9664\u4e00\u4e2a\u4f9d\u8d56\u9879\u6216\u7f16\u8f91\u5176\u7248\u672c\uff0c\u60a8\u5e94\u8be5\u4f7f\u7528poetry remove\u547d\u4ee4\u3002\u867d\u7136\u624b\u52a8\u7f16\u8f91pyproject.toml\u6587\u4ef6\u662f\u53ef\u80fd\u7684\uff0c\u4f46\u60a8\u5fc5\u987b\u8003\u8651\u9501\u5b9a\u6587\u4ef6\u5e76\u624b\u52a8\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u3002\u56e0\u6b64\uff0c\u5728\u60a8\u60f3\u8981\u66f4\u6539requests\u7684\u7248\u672c\u7684\u60c5\u51b5\u4e0b\uff0c\u9996\u5148\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06\u5176\u5220\u9664\uff1a<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\">poetry remove requests\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><div class=\"secondary-code-label\" title=\"\u8f93\u51fa\">\u8f93\u51fa\r\n<h3>\u66f4\u65b0\u4f9d\u8d56<\/h3>\r\n<pre class=\"post-pre\"><code>\u66f4\u65b0\u4f9d\u8d56\u4e2d\r\n\u89e3\u6790\u4f9d\u8d56... (0.1\u79d2)\r\n\r\n\u5199\u5165\u9501\u5b9a\u6587\u4ef6\r\n\r\n\u5305\u64cd\u4f5c\uff1a0\u4e2a\u5b89\u88c5\uff0c0\u4e2a\u66f4\u65b0\uff0c5\u4e2a\u79fb\u9664\r\n\r\n  \u2022 \u79fb\u9664 certifi (2022.9.24)\r\n  \u2022 \u79fb\u9664 charset-normalizer (2.1.1)\r\n  \u2022 \u79fb\u9664 idna (3.4)\r\n  \u2022 \u79fb\u9664 requests (2.28.1)\r\n  \u2022 \u79fb\u9664 urllib3 (1.26.12)\r\n<\/code><\/pre>\n<p>\u65e2\u7136\u8bf7\u6c42\u5e93\u5df2\u88ab\u79fb\u9664\uff0c\u90a3\u4e48\u63a5\u4e0b\u6765\u4f60\u53ef\u4ee5\u5c06\u5176\u4f5c\u4e3a\u4e00\u4e2a\u56fa\u5b9a\u4f9d\u8d56\u6dfb\u52a0\u56de\u6765\u3002\u5728\u4f9d\u8d56\u5173\u7cfb\u4e2d\uff0c\u901a\u5e38\u4f60\u5e0c\u671b\u5c06\u67d0\u4e2a\u5e93\u4fdd\u6301\u5728\u7279\u5b9a\u7248\u672c\u4ee5\u7b26\u5408\u9879\u76ee\u7684\u8981\u6c42\u3002\u8fd9\u901a\u5e38\u662f\u56e0\u4e3a\u5e93\u4f1a\u968f\u7740\u65f6\u95f4\u7684\u63a8\u79fb\u800c\u53d8\u5316\uff0c\u901a\u8fc7\u56fa\u5b9a\u4f9d\u8d56\u53ef\u4ee5\u6709\u5229\u4e8e\u4fdd\u6301\u9879\u76ee\u7684\u4e00\u81f4\u6027\u3002\u8fd9\u5c31\u662f\u6240\u8c13\u7684\u9501\u5b9a\u4f9d\u8d56\u7248\u672c\u3002<\/p>\n<p>\u4f5c\u4e3a\u4e00\u4e2a\u793a\u4f8b\uff0c\u5f53\u8fd0\u884cadd\u547d\u4ee4\u65f6\uff0c\u60a8\u53ef\u4ee5\u5c06\u8bf7\u6c42\u5e93\u56fa\u5b9a\u5728\u4e0d\u662f\u6700\u65b0\u7248\u672c\u7684\u5176\u4ed6\u7248\u672c\u4e0a\u3002\u76f8\u53cd\uff0c\u60a8\u5c06\u628a\u5b83\u56fa\u5b9a\u57282.26.0\u4e0a\uff0c\u8fd9\u662f\u5728PyPI\u8bf7\u6c42\u5386\u53f2\u8bb0\u5f55\u4e2d\u627e\u5230\u7684\u4e00\u4e2a\u65e9\u671f\u6709\u6548\u7684\u53d1\u5e03\u7248\u672c\u3002<\/p>\n<pre class=\"post-pre\"><code><ol><li data-prefix=\"$\">poetry <span class=\"token function\">add<\/span> requests@2.26.0\r\n<\/li><\/ol>\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code><div class=\"secondary-code-label\" title=\"\u8f93\u51fa\">\u8f93\u51fa<\/div>\u66f4\u65b0\u4f9d\u8d56\u4e2d\r\n\u89e3\u6790\u4f9d\u8d56... (0.3\u79d2)\r\n\r\n\u5199\u5165\u9501\u5b9a\u6587\u4ef6\r\n\r\n\u5305\u64cd\u4f5c\uff1a5\u4e2a\u5b89\u88c5\uff0c0\u4e2a\u66f4\u65b0\uff0c0\u4e2a\u79fb\u9664\r\n\r\n  \u2022 \u5b89\u88c5 certifi (2022.9.24)\r\n  \u2022 \u5b89\u88c5 charset-normalizer (2.0.12)\r\n  \u2022 \u5b89\u88c5 idna (3.4)\r\n  \u2022 \u5b89\u88c5 urllib3 (1.26.12)\r\n  \u2022 \u5b89\u88c5 requests (2.26.0)\r\n<\/code><\/pre>\n<p>\u73b0\u5728\uff0c\u5728\u60a8\u7684pyproject.toml\u6587\u4ef6\u4e2d\uff0c\u60a8\u5c06\u627e\u5230\uff1a<\/p>\n<p>pyproject.toml\u662f\u53ef\u4ee5\u5728Python\u9879\u76ee\u4e2d\u4f7f\u7528\u7684\u4e00\u79cd\u914d\u7f6e\u6587\u4ef6\u683c\u5f0f\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"token punctuation\">.<\/span> <span class=\"token punctuation\">.<\/span> <span class=\"token punctuation\">.<\/span>\r\n<span class=\"token punctuation\">[<\/span><span class=\"token table class-name\">tool.poetry.dependencies<\/span><span class=\"token punctuation\">]<\/span>\r\n<span class=\"token key property\">python<\/span> <span class=\"token punctuation\">=<\/span> <span class=\"token string\">\"^3.10\"<\/span>\r\n<span class=\"token key property\">requests<\/span> <span class=\"token punctuation\">=<\/span> <mark><span class=\"token string\">\"2.26.0\"<\/span><\/mark>\r\n<span class=\"token punctuation\">.<\/span> <span class=\"token punctuation\">.<\/span> <span class=\"token punctuation\">.<\/span>\r\n<\/code><\/pre>\n<p>\u8fd9\u8868\u793a\u8bf7\u6c42\u5e93\u5c06\u59cb\u7ec8\u5b89\u88c5\u4e3a\u7279\u5b9a\u7248\u672c2.26.0\u3002<\/p>\n<h2>\u7ed3\u8bba<\/h2>\n<p>\u5728\u8fd9\u4e2a\u6559\u7a0b\u4e2d\uff0c\u60a8\u5df2\u7ecf\u5b89\u88c5\u4e86Poetry\uff0c\u5e76\u521b\u5efa\u4e86\u4e00\u4e2aPoetry\u9879\u76ee\uff0c\u53ef\u4ee5\u4ece\u5934\u5f00\u59cb\u6216\u5728\u73b0\u6709\u9879\u76ee\u4e2d\u521b\u5efa\u3002\u60a8\u8fd8\u4e3a\u9879\u76ee\u6dfb\u52a0\u4e86\u4f9d\u8d56\u9879\uff0c\u7136\u540e\u5728\u865a\u62df\u73af\u5883\u4e2d\u5b89\u88c5\u4e86\u8fd9\u4e9b\u4f9d\u8d56\u9879\u3002\u6b64\u5916\uff0c\u5728\u5c06\u5176\u6dfb\u52a0\u4e3a\u9879\u76ee\u7684\u56fa\u5b9a\u4f9d\u8d56\u9879\u4e4b\u524d\uff0c\u60a8\u8fd8\u5220\u9664\u4e86\u4e00\u4e2a\u4f9d\u8d56\u9879\u3002\u63a5\u4e0b\u6765\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e2a\u6559\u7a0b\u6765\u63a2\u7d22\u66f4\u591aPoetry\u7684\u529f\u80fd\uff0c\u5b66\u4e60\u5982\u4f55\u5728Ubuntu 22.04\u4e0a\u4f7f\u7528Poetry\u53d1\u5e03Python\u5305\u5230PyPI\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ecb\u7ecd Poetry\u662fPython\u7684\u4e00\u4e2a\u4f9d\u8d56\u7ba1\u7406\u5de5\u5177\uff0c\u8fd8\u80fd\u591f\u6784\u5efa\u548c\u6253\u5305\u7528\u4e8e\u5206\u53d1\u7684Python\u9879\u76ee\u3002\u4f5c\u4e3a\u4e00\u4e2a\u4f9d\u8d56\u7ba1 [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[483,1077,1095,1096,300],"class_list":{"0":"post-317","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-uncategorized","7":"tag-linux","8":"tag-poetry","9":"tag-python","11":"tag-ubuntu-22-04"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ubuntu 22.04\u5b89\u88c5Poetry\uff1aPython\u4f9d\u8d56\u7ba1\u7406\u5b8c\u5168\u6307\u5357 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5728Ubuntu 22.04\u7cfb\u7edf\u4e0a\u5b89\u88c5Poetry\u5de5\u5177\u7684\u6b65\u9aa4\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u9ad8\u6548\u7ba1\u7406Python\u9879\u76ee\u4f9d\u8d56\u5e93\u3002\u4ece\u5b89\u88c5\u914d\u7f6e\u5230\u57fa\u672c\u4f7f\u7528\uff0c\u5168\u9762\u638c\u63e1Poetry\u8fd9\u4e00Python\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5982\u4f55\u5728ubuntu-22-04\u4e0a\u5b89\u88c5poetry\u6765\u7ba1\u7406python\u4f9d\u8d56\u5e93\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ubuntu 22.04\u5b89\u88c5Poetry\uff1aPython\u4f9d\u8d56\u7ba1\u7406\u5b8c\u5168\u6307\u5357\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5728Ubuntu 22.04\u7cfb\u7edf\u4e0a\u5b89\u88c5Poetry\u5de5\u5177\u7684\u6b65\u9aa4\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u9ad8\u6548\u7ba1\u7406Python\u9879\u76ee\u4f9d\u8d56\u5e93\u3002\u4ece\u5b89\u88c5\u914d\u7f6e\u5230\u57fa\u672c\u4f7f\u7528\uff0c\u5168\u9762\u638c\u63e1Poetry\u8fd9\u4e00Python\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5982\u4f55\u5728ubuntu-22-04\u4e0a\u5b89\u88c5poetry\u6765\u7ba1\u7406python\u4f9d\u8d56\u5e93\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-10T10:21:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-01T13:39:33+00:00\" \/>\n<meta name=\"author\" content=\"\u96c5, \u609f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u96c5, \u609f\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/\",\"name\":\"Ubuntu 22.04\u5b89\u88c5Poetry\uff1aPython\u4f9d\u8d56\u7ba1\u7406\u5b8c\u5168\u6307\u5357 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-12-10T10:21:21+00:00\",\"dateModified\":\"2025-08-01T13:39:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\"},\"description\":\"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5728Ubuntu 22.04\u7cfb\u7edf\u4e0a\u5b89\u88c5Poetry\u5de5\u5177\u7684\u6b65\u9aa4\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u9ad8\u6548\u7ba1\u7406Python\u9879\u76ee\u4f9d\u8d56\u5e93\u3002\u4ece\u5b89\u88c5\u914d\u7f6e\u5230\u57fa\u672c\u4f7f\u7528\uff0c\u5168\u9762\u638c\u63e1Poetry\u8fd9\u4e00Python\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ubuntu 22.04\u5b89\u88c5Poetry\uff1aPython\u4f9d\u8d56\u7ba1\u7406\u5b8c\u5168\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\",\"name\":\"\u96c5, \u609f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"caption\":\"\u96c5, \u609f\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ubuntu 22.04\u5b89\u88c5Poetry\uff1aPython\u4f9d\u8d56\u7ba1\u7406\u5b8c\u5168\u6307\u5357 - Blog - Silicon Cloud","description":"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5728Ubuntu 22.04\u7cfb\u7edf\u4e0a\u5b89\u88c5Poetry\u5de5\u5177\u7684\u6b65\u9aa4\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u9ad8\u6548\u7ba1\u7406Python\u9879\u76ee\u4f9d\u8d56\u5e93\u3002\u4ece\u5b89\u88c5\u914d\u7f6e\u5230\u57fa\u672c\u4f7f\u7528\uff0c\u5168\u9762\u638c\u63e1Poetry\u8fd9\u4e00Python\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5982\u4f55\u5728ubuntu-22-04\u4e0a\u5b89\u88c5poetry\u6765\u7ba1\u7406python\u4f9d\u8d56\u5e93\/","og_locale":"zh_CN","og_type":"article","og_title":"Ubuntu 22.04\u5b89\u88c5Poetry\uff1aPython\u4f9d\u8d56\u7ba1\u7406\u5b8c\u5168\u6307\u5357","og_description":"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5728Ubuntu 22.04\u7cfb\u7edf\u4e0a\u5b89\u88c5Poetry\u5de5\u5177\u7684\u6b65\u9aa4\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u9ad8\u6548\u7ba1\u7406Python\u9879\u76ee\u4f9d\u8d56\u5e93\u3002\u4ece\u5b89\u88c5\u914d\u7f6e\u5230\u57fa\u672c\u4f7f\u7528\uff0c\u5168\u9762\u638c\u63e1Poetry\u8fd9\u4e00Python\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5982\u4f55\u5728ubuntu-22-04\u4e0a\u5b89\u88c5poetry\u6765\u7ba1\u7406python\u4f9d\u8d56\u5e93\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-12-10T10:21:21+00:00","article_modified_time":"2025-08-01T13:39:33+00:00","author":"\u96c5, \u609f","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u96c5, \u609f","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/","name":"Ubuntu 22.04\u5b89\u88c5Poetry\uff1aPython\u4f9d\u8d56\u7ba1\u7406\u5b8c\u5168\u6307\u5357 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-12-10T10:21:21+00:00","dateModified":"2025-08-01T13:39:33+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6"},"description":"\u672c\u6559\u7a0b\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5728Ubuntu 22.04\u7cfb\u7edf\u4e0a\u5b89\u88c5Poetry\u5de5\u5177\u7684\u6b65\u9aa4\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u9ad8\u6548\u7ba1\u7406Python\u9879\u76ee\u4f9d\u8d56\u5e93\u3002\u4ece\u5b89\u88c5\u914d\u7f6e\u5230\u57fa\u672c\u4f7f\u7528\uff0c\u5168\u9762\u638c\u63e1Poetry\u8fd9\u4e00Python\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Ubuntu 22.04\u5b89\u88c5Poetry\uff1aPython\u4f9d\u8d56\u7ba1\u7406\u5b8c\u5168\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6","name":"\u96c5, \u609f","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","caption":"\u96c5, \u609f"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu-22-04%e4%b8%8a%e5%ae%89%e8%a3%85poetry%e6%9d%a5%e7%ae%a1%e7%90%86python%e4%be%9d%e8%b5%96%e5%ba%93\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=317"}],"version-history":[{"count":3,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/317\/revisions"}],"predecessor-version":[{"id":109816,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/317\/revisions\/109816"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}