{"id":5100,"date":"2020-06-09T10:37:30","date_gmt":"2020-06-09T08:37:30","guid":{"rendered":"https:\/\/myoceane.fr\/?p=5100"},"modified":"2020-06-12T07:43:24","modified_gmt":"2020-06-12T05:43:24","slug":"python-poetry","status":"publish","type":"post","link":"https:\/\/myoceane.fr\/index.php\/python-poetry\/","title":{"rendered":"[Python]  \u5957\u4ef6\u7ba1\u7406 &#8211; Poetry"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>Python \u4ee5\u4ed6\u5f37\u5927\u53c8\u591a\u6a23\u5316\u7684\u5957\u4ef6\u51fd\u5f0f\u5eab\u805e\u540d\uff0c\u4f7f\u7528\u7c21\u55ae\u7684 pip install [library] \u6307\u4ee4\u53ef\u4ee5\u505a\u5230\u5feb\u901f\u5b89\u88dd\u81ea\u5df1\u60f3\u8981\u7684 python library\uff0c\u95dc\u65bc pip \u76f8\u95dc\u7684\u6587\u7ae0\uff0c\u7db2\u8def\u4e0a\u53ef\u4ee5\u7c21\u55ae\u627e\u5230\u5f88\u591a<a href=\"https:\/\/pip.pypa.io\/en\/stable\/quickstart\/\">\u6559\u5b78<\/a>\uff0c\u672c\u7bc7\u53c3\u8003\uff1a<\/p>\n\n\n<div class=\"wp-block-buttons aligncenter is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link\">\u70ba\u4ec0\u9ebc\u8981\u7528 Poetry ?<\/a><\/div>\n<\/div>\n\n\n<p style=\"text-align: justify;\">\u4ecb\u7d39\u53e6\u5916\u4e00\u500b Python \u5957\u4ef6\u7528\u65bc\u5957\u4ef6\u7ba1\u7406 &#8211; <a href=\"https:\/\/python-poetry.org\/docs\/\">Poetry<\/a>\uff0c\u76f8\u8f03\u65bc pip \u7684\u7ba1\u7406\u65b9\u5f0f\uff0cpoetry \u7684\u597d\u8655\u5728\u65bc\u7576\u6211\u5011\u522a\u9664\u6389\u67d0\u4e00\u500b\u4e0d\u9700\u8981\u7684 package \u7684\u6642\u5019\uff0c\u6211\u5011\u53ef\u4ee5\u4e5f\u628a\u5176\u4ed6\u76f8\u95dc\u4f46\u662f\u4e0d\u9700\u8981\u7684\u5957\u4ef6\u4e00\u4f75\u522a\u9664\uff0c\u7531\u6b64\u53ef\u4ee5\u7cbe\u7c21\u771f\u6b63\u9700\u8981\u7684 Python \u5957\u4ef6\uff0c\u4e0d\u6703\u904e\u5ea6\u589e\u52a0\u4e0d\u5fc5\u8981\u7684 python \u5957\u4ef6\uff0c\u4ee5\u4e0b\u6211\u5011\u8209\u5be6\u4f8b\u6f14\u91cb\u3002<\/p>\n<h5>\u5b89\u88dd Poetry \u5230\u57f7\u884c\u4e3b\u6a5f\uff1a<\/h5>\n<pre class=\"lang:bash\">pip3 install poetry\npip3 list\npoetry             1.0.8<\/pre>\n<p>\u00a0\u5b89\u88dd\u4e26\u67e5\u770b\u662f\u5426\u5b89\u88dd\u6b63\u78ba\uff01<\/p>\n<h5><a href=\"https:\/\/python-poetry.org\/docs\/basic-usage\/\">\u521d\u59cb\u5316\u5c08\u6848<\/a>\uff1a<\/h5>\n<p>\u8981\u521d\u59cb\u5316\u5c08\u6848\u57f7\u884c\u4ee5\u4e0b\u6307\u4ee4\uff1a<\/p>\n<pre class=\"lang:bash\">poetry new project-name<\/pre>\n<p>\u6b64\u6642\u6703\u5f97\u5230\u4e00\u6574\u500b\u5c08\u6848\u7684\u74b0\u5883\u8a2d\u5b9a\uff0c\u4e26\u4e14\u6703\u7522\u751f\u4e00\u500b\u5f88\u91cd\u8981\u7684\u6a94\u6848 pyproject.toml\uff0c\u9019\u500b\u6a94\u6848\u5305\u542b\u4e86\u5c08\u6848\u7684\u8a2d\u5b9a\u4e00\u4e9b\u57fa\u672c\u8a2d\u5b9a\u7b49\u7b49\uff1a<\/p>\n<pre class=\"lang:bash\">[tool.poetry]\nname = \"project-name\"\nversion = \"0.1.0\"\ndescription = \"\"\nauthors = [\"Author &lt;author@gmail.com&gt;\"]\n\n[tool.poetry.dependencies]\npython = \"^3.7\"\n\n[tool.poetry.dev-dependencies]\npytest = \"^5.2\"\n\n[build-system]\nrequires = [\"poetry&gt;=0.12\"]\nbuild-backend = \"poetry.masonry.api\"<\/pre>\n<p>\u5099\u8a3b\uff1a\u95dc\u65bc\u7248\u672c\u7684\u5207\u63db\u53ef\u4ee5<a href=\"https:\/\/myoceane.fr\/index.php\/python-alternatives\/\">\u53c3\u8003<\/a><\/p>\n<h5>\u65b0\u589e python packages\uff1a<\/h5>\n<p>\u900f\u904e\u4ee5\u4e0b\u7684\u6307\u4ee4\u65b0\u589e\u7b2c\u4e00\u500b package \u9032\u5230 poetry dependency management\uff0c\u4ee5\u4e0b\u6211\u5011\u5c55\u793a\u65b0\u589e\u00a0 setuptools \u7684\u4e00\u500b\u7bc4\u4f8b\u3002<\/p>\n<pre class=\"lang:bash\">poetry add setuptools\n\nUsing version ^47.1.1 for setuptools\nUpdating dependencies\nResolving dependencies... (0.3s)\nWriting lock file\n\nPackage operations: 11 installs, 0 updates, 0 removals\n\n  - Installing zipp (3.1.0)\n  - Installing importlib-metadata (1.6.1)\n  - Installing pyparsing (2.4.7)\n  - Installing six (1.15.0)\n  - Installing attrs (19.3.0)\n  - Installing more-itertools (8.3.0)\n  - Installing packaging (20.4)\n  - Installing pluggy (0.13.1)\n  - Installing py (1.8.1)\n  - Installing wcwidth (0.2.4)\n  - Installing pytest (5.4.3)<\/pre>\n<p>\u6b64\u6642\u6703\u7522\u751f poetry.lock \u6a94\uff0c\u9019\u4e00\u500b\u6a94\u6848\u6703\u5728\u4e0b\u4e00\u6b65 install \u7684\u6642\u5019\u7528\u5230\uff0c<\/p>\n<pre class=\"lang:bash\">cat poetry.lock\n[[package]]\ncategory = \"dev\"\ndescription = \"Atomic file writes.\"\nmarker = \"sys_platform == \\\"win32\\\"\"\nname = \"atomicwrites\"\noptional = false\npython-versions = \"&gt;=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*\"\nversion = \"1.4.0\"\n\n[[package]]\ncategory = \"dev\"\ndescription = \"Classes Without Boilerplate\"\nname = \"attrs\"\noptional = false\npython-versions = \"&gt;=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*\"\nversion = \"19.3.0\"\n\n[package.extras]\nazure-pipelines = [\"coverage\", \"hypothesis\", \"pympler\", \"pytest (&gt;=4.3.0)\", \"six\", \"zope.interface\", \"pytest-azurepipelines\"]\ndev = [\"coverage\", \"hypothesis\", \"pympler\", \"pytest (&gt;=4.3.0)\", \"six\", \"zope.interface\", \"sphinx\", \"pre-commit\"]\ndocs = [\"sphinx\", \"zope.interface\"]\ntests = [\"coverage\", \"hypothesis\", \"pympler\", \"pytest (&gt;=4.3.0)\", \"six\", \"zope.interface\"]\n\n[[package]]\ncategory = \"dev\"\ndescription = \"Cross-platform colored terminal text.\"\nmarker = \"sys_platform == \\\"win32\\\"\"\nname = \"colorama\"\noptional = false\npython-versions = \"&gt;=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*\"\nversion = \"0.4.3\"\n\n[[package]]\ncategory = \"dev\"\ndescription = \"Read metadata from Python packages\"\nmarker = \"python_version &lt; \\\"3.8\\\"\"\nname = \"importlib-metadata\"\noptional = false\npython-versions = \"!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,&gt;=2.7\"\nversion = \"1.6.1\"\n\n[package.dependencies]\nzipp = \"&gt;=0.5\"\n\n[package.extras]\ndocs = [\"sphinx\", \"rst.linker\"]\ntesting = [\"packaging\", \"pep517\", \"importlib-resources (&gt;=1.3)\"]\n\n[[package]]\ncategory = \"dev\"\ndescription = \"More routines for operating on iterables, beyond itertools\"\nname = \"more-itertools\"\noptional = false\npython-versions = \"&gt;=3.5\"\nversion = \"8.3.0\"\n\n[[package]]\ncategory = \"dev\"\ndescription = \"Core utilities for Python packages\"\nname = \"packaging\"\noptional = false\npython-versions = \"&gt;=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*\"\nversion = \"20.4\"\n\n[package.dependencies]\npyparsing = \"&gt;=2.0.2\"\nsix = \"*\"\n\n[[package]]\ncategory = \"dev\"\ndescription = \"plugin and hook calling mechanisms for python\"\nname = \"pluggy\"\noptional = false\npython-versions = \"&gt;=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*\"\nversion = \"0.13.1\"\n\n[package.dependencies]\n[package.dependencies.importlib-metadata]\npython = \"&lt;3.8\"\nversion = \"&gt;=0.12\"\n\n[package.extras]\ndev = [\"pre-commit\", \"tox\"]\n\n[[package]]\ncategory = \"dev\"\ndescription = \"library with cross-python path, ini-parsing, io, code, log facilities\"\nname = \"py\"\noptional = false\npython-versions = \"&gt;=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*\"\nversion = \"1.8.1\"\n\n[[package]]\ncategory = \"dev\"\ndescription = \"Python parsing module\"\nname = \"pyparsing\"\noptional = false\npython-versions = \"&gt;=2.6, !=3.0.*, !=3.1.*, !=3.2.*\"\nversion = \"2.4.7\"\n\n[[package]]\ncategory = \"dev\"\ndescription = \"pytest: simple powerful testing with Python\"\nname = \"pytest\"\noptional = false\npython-versions = \"&gt;=3.5\"\nversion = \"5.4.3\"\n\n[package.dependencies]\natomicwrites = \"&gt;=1.0\"\nattrs = \"&gt;=17.4.0\"\ncolorama = \"*\"\nmore-itertools = \"&gt;=4.0.0\"\npackaging = \"*\"\npluggy = \"&gt;=0.12,&lt;1.0\"\npy = \"&gt;=1.5.0\"\nwcwidth = \"*\"\n\n[package.dependencies.importlib-metadata]\npython = \"&lt;3.8\"\nversion = \"&gt;=0.12\"\n\n[package.extras]\ncheckqa-mypy = [\"mypy (v0.761)\"]\ntesting = [\"argcomplete\", \"hypothesis (&gt;=3.56)\", \"mock\", \"nose\", \"requests\", \"xmlschema\"]\n\n[[package]]\ncategory = \"dev\"\ndescription = \"Python 2 and 3 compatibility utilities\"\nname = \"six\"\noptional = false\npython-versions = \"&gt;=2.7, !=3.0.*, !=3.1.*, !=3.2.*\"\nversion = \"1.15.0\"\n\n[[package]]\ncategory = \"dev\"\ndescription = \"Measures the displayed width of unicode strings in a terminal\"\nname = \"wcwidth\"\noptional = false\npython-versions = \"*\"\nversion = \"0.2.4\"\n\n[[package]]\ncategory = \"dev\"\ndescription = \"Backport of pathlib-compatible object wrapper for zip files\"\nmarker = \"python_version &lt; \\\"3.8\\\"\"\nname = \"zipp\"\noptional = false\npython-versions = \"&gt;=3.6\"\nversion = \"3.1.0\"\n\n[package.extras]\ndocs = [\"sphinx\", \"jaraco.packaging (&gt;=3.2)\", \"rst.linker (&gt;=1.9)\"]\ntesting = [\"jaraco.itertools\", \"func-timeout\"]\n\n[metadata]\ncontent-hash = \"588a2ec7a4f62a0c37a76e41ee7b14a0e27bc0f20474d11ded0fe676ac187031\"\npython-versions = \"^3.7\"\n\n[metadata.files]\natomicwrites = [\n    {file = \"atomicwrites-1.4.0-py2.py3-none-any.whl\", hash = \"sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197\"},\n    {file = \"atomicwrites-1.4.0.tar.gz\", hash = \"sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a\"},\n]\nattrs = [\n    {file = \"attrs-19.3.0-py2.py3-none-any.whl\", hash = \"sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c\"},\n    {file = \"attrs-19.3.0.tar.gz\", hash = \"sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72\"},\n]\ncolorama = [\n    {file = \"colorama-0.4.3-py2.py3-none-any.whl\", hash = \"sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff\"},\n    {file = \"colorama-0.4.3.tar.gz\", hash = \"sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1\"},\n]\nimportlib-metadata = [\n    {file = \"importlib_metadata-1.6.1-py2.py3-none-any.whl\", hash = \"sha256:15ec6c0fd909e893e3a08b3a7c76ecb149122fb14b7efe1199ddd4c7c57ea958\"},\n    {file = \"importlib_metadata-1.6.1.tar.gz\", hash = \"sha256:0505dd08068cfec00f53a74a0ad927676d7757da81b7436a6eefe4c7cf75c545\"},\n]\nmore-itertools = [\n    {file = \"more-itertools-8.3.0.tar.gz\", hash = \"sha256:558bb897a2232f5e4f8e2399089e35aecb746e1f9191b6584a151647e89267be\"},\n    {file = \"more_itertools-8.3.0-py3-none-any.whl\", hash = \"sha256:7818f596b1e87be009031c7653d01acc46ed422e6656b394b0f765ce66ed4982\"},\n]\npackaging = [\n    {file = \"packaging-20.4-py2.py3-none-any.whl\", hash = \"sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181\"},\n    {file = \"packaging-20.4.tar.gz\", hash = \"sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8\"},\n]\npluggy = [\n    {file = \"pluggy-0.13.1-py2.py3-none-any.whl\", hash = \"sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d\"},\n    {file = \"pluggy-0.13.1.tar.gz\", hash = \"sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0\"},\n]\npy = [\n    {file = \"py-1.8.1-py2.py3-none-any.whl\", hash = \"sha256:c20fdd83a5dbc0af9efd622bee9a5564e278f6380fffcacc43ba6f43db2813b0\"},\n    {file = \"py-1.8.1.tar.gz\", hash = \"sha256:5e27081401262157467ad6e7f851b7aa402c5852dbcb3dae06768434de5752aa\"},\n]\npyparsing = [\n    {file = \"pyparsing-2.4.7-py2.py3-none-any.whl\", hash = \"sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b\"},\n    {file = \"pyparsing-2.4.7.tar.gz\", hash = \"sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1\"},\n]\npytest = [\n    {file = \"pytest-5.4.3-py3-none-any.whl\", hash = \"sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1\"},\n    {file = \"pytest-5.4.3.tar.gz\", hash = \"sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8\"},\n]\nsix = [\n    {file = \"six-1.15.0-py2.py3-none-any.whl\", hash = \"sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced\"},\n    {file = \"six-1.15.0.tar.gz\", hash = \"sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259\"},\n]\nwcwidth = [\n    {file = \"wcwidth-0.2.4-py2.py3-none-any.whl\", hash = \"sha256:79375666b9954d4a1a10739315816324c3e73110af9d0e102d906fdb0aec009f\"},\n    {file = \"wcwidth-0.2.4.tar.gz\", hash = \"sha256:8c6b5b6ee1360b842645f336d9e5d68c55817c26d3050f46b235ef2bc650e48f\"},\n]\nzipp = [\n    {file = \"zipp-3.1.0-py3-none-any.whl\", hash = \"sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b\"},\n    {file = \"zipp-3.1.0.tar.gz\", hash = \"sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96\"},\n]<\/pre>\n<p>*<a href=\"https:\/\/github.com\/python-poetry\/poetry\/issues\/1440\">\u5099\u8a3b<\/a>\uff1a\u5982\u679c\u8981\u65b0\u589e\u4e00\u500b\u7279\u5b9a\u7248\u672c\u6578\u7684 package \u53ef\u4ee5\u8f38\u5165\u4ee5\u4e0b\u7684\u6307\u4ee4\uff1a<\/p>\n<pre class=\"lang:bash\">poetry add pyspark=2.4.1<\/pre>\n<h5>\u79fb\u9664\u4e0d\u60f3\u8981\u7684 package\uff1a<\/h5>\n<p>\u5982\u679c\u60f3\u8981\u79fb\u51fa\u4e0d\u60f3\u8981\u7684 package \u5247\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u7684\u6307\u4ee4\u522a\u9664\uff1a<\/p>\n<pre class=\"lang:bash\">poetry remove package<\/pre>\n<h5>\u5229\u7528 poetry.lock \u5b89\u88dd poetry \u7ba1\u7406\u7684 packages\uff1a<\/h5>\n<pre class=\"lang:bash\">poetry install --no-dev<\/pre>\n<p>\u7531\u65bc\u6211\u5011\u662f\u5229\u7528 Docker \u4f86\u5efa\u7acb\u6620\u50cf\u6a94\uff0c\u6211\u5011\u9047\u5230\u4e86\u4ee5\u4e0b\u7684\u554f\u984c\uff1a<\/p>\n<pre class=\"lang:bash\">[CalledProcessError]\nCommand '['\/root\/.cache\/pypoetry\/virtualenvs\/annotation-6WcazSRI-py3.7\/bin\/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.\nThe command '\/bin\/sh -c poetry install' returned a non-zero code: 1<\/pre>\n<p>\u89e3\u6c7a\u8fa6\u6cd5\u662f<a href=\"https:\/\/stackoverflow.com\/questions\/53835198\/integrating-python-poetry-with-docker\">\u53c3\u8003<\/a>\uff0c\u589e\u52a0\u4e00\u884c\u6307\u4ee4\u5728 Dockerfile \u4e2d\u53d6\u6d88\u4f7f\u7528 virtualenv\uff1a<\/p>\n<pre class=\"lang:bash\">poetry config virtualenvs.create false<\/pre>","protected":false},"excerpt":{"rendered":"<p>\u4ecb\u7d39\u53e6\u5916\u4e00\u500b Python \u5957\u4ef6\u7528\u65bc\u5957\u4ef6\u7ba1\u7406 &#8211; Poetry\uff0c\u76f8\u8f03\u65bc pip \u7684\u7ba1\u7406\u65b9\u5f0f\uff0cpoetry \u7684\u597d\u8655\u5728\u65bc\u7576\u6211\u5011\u522a\u9664\u6389\u67d0\u4e00\u500b\u4e0d\u9700\u8981\u7684 package \u7684\u6642\u5019\uff0c\u6211\u5011\u53ef\u4ee5\u4e5f\u628a\u5176\u4ed6\u76f8\u95dc\u4f46\u662f\u4e0d\u9700\u8981\u7684\u5957\u4ef6\u4e00\u4f75\u522a\u9664\uff0c\u7531\u6b64\u53ef\u4ee5\u7cbe\u7c21\u771f\u6b63\u9700\u8981\u7684 Python \u5957\u4ef6\uff0c\u4e0d\u6703\u904e\u5ea6\u589e\u52a0\u4e0d\u5fc5\u8981\u7684 python \u5957\u4ef6\uff0c\u4ee5\u4e0b\u6211\u5011\u8209\u5be6\u4f8b\u6f14\u91cb\u3002<\/p>\n","protected":false},"author":1,"featured_media":5188,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,176],"tags":[540,541,539,19],"class_list":["post-5100","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-it-technology","category-python","tag-dependency-management","tag-pip","tag-poetry","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Python] \u5957\u4ef6\u7ba1\u7406 - Poetry - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane<\/title>\n<meta name=\"description\" content=\"\u4ecb\u7d39\u53e6\u5916\u4e00\u500b Python \u5957\u4ef6\u7528\u65bc\u5957\u4ef6\u7ba1\u7406 - Poetry\uff0c\u76f8\u8f03\u65bc pip \u7684\u7ba1\u7406\u65b9\u5f0f\uff0cpoetry \u7684\u597d\u8655\u5728\u65bc\u7576\u6211\u5011\u522a\u9664\u6389\u67d0\u4e00\u500b\u4e0d\u9700\u8981\u7684 package \u7684\u6642\u5019\uff0c\u6211\u5011\u53ef\u4ee5\u4e5f\u628a\u5176\u4ed6\u76f8\u95dc\u4f46\u662f\u4e0d\u9700\u8981\u7684\u5957\u4ef6\u4e00\u4f75\u522a\u9664\uff0c\u7531\u6b64\u53ef\u4ee5\u7cbe\u7c21\u771f\u6b63\u9700\u8981\u7684 Python \u5957\u4ef6\uff0c\u4e0d\u6703\u904e\u5ea6\u589e\u52a0\u4e0d\u5fc5\u8981\u7684 python \u5957\u4ef6\uff0c\u4ee5\u4e0b\u6211\u5011\u8209\u5be6\u4f8b\u6f14\u91cb\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:\/\/myoceane.fr\/index.php\/python-poetry\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Python] \u5957\u4ef6\u7ba1\u7406 - Poetry - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane\" \/>\n<meta property=\"og:description\" content=\"\u4ecb\u7d39\u53e6\u5916\u4e00\u500b Python \u5957\u4ef6\u7528\u65bc\u5957\u4ef6\u7ba1\u7406 - Poetry\uff0c\u76f8\u8f03\u65bc pip \u7684\u7ba1\u7406\u65b9\u5f0f\uff0cpoetry \u7684\u597d\u8655\u5728\u65bc\u7576\u6211\u5011\u522a\u9664\u6389\u67d0\u4e00\u500b\u4e0d\u9700\u8981\u7684 package \u7684\u6642\u5019\uff0c\u6211\u5011\u53ef\u4ee5\u4e5f\u628a\u5176\u4ed6\u76f8\u95dc\u4f46\u662f\u4e0d\u9700\u8981\u7684\u5957\u4ef6\u4e00\u4f75\u522a\u9664\uff0c\u7531\u6b64\u53ef\u4ee5\u7cbe\u7c21\u771f\u6b63\u9700\u8981\u7684 Python \u5957\u4ef6\uff0c\u4e0d\u6703\u904e\u5ea6\u589e\u52a0\u4e0d\u5fc5\u8981\u7684 python \u5957\u4ef6\uff0c\u4ee5\u4e0b\u6211\u5011\u8209\u5be6\u4f8b\u6f14\u91cb\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/myoceane.fr\/index.php\/python-poetry\/\" \/>\n<meta property=\"og:site_name\" content=\"\u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-09T08:37:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-12T05:43:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/myoceane.fr\/wp-content\/uploads\/2020\/06\/poetry.png\" \/>\n\t<meta property=\"og:image:width\" content=\"856\" \/>\n\t<meta property=\"og:image:height\" content=\"170\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"\u6ab8\u6aac\u7238\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6ab8\u6aac\u7238\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/\"},\"author\":{\"name\":\"\u6ab8\u6aac\u7238\",\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b\"},\"headline\":\"[Python] \u5957\u4ef6\u7ba1\u7406 &#8211; Poetry\",\"datePublished\":\"2020-06-09T08:37:30+00:00\",\"dateModified\":\"2020-06-12T05:43:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/\"},\"wordCount\":42,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b\"},\"image\":{\"@id\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/myoceane.fr\/wp-content\/uploads\/2020\/06\/poetry.png\",\"keywords\":[\"Dependency Management\",\"pip\",\"Poetry\",\"Python\"],\"articleSection\":[\"IT Technology\",\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/myoceane.fr\/index.php\/python-poetry\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/\",\"url\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/\",\"name\":\"[Python] \u5957\u4ef6\u7ba1\u7406 - Poetry - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane\",\"isPartOf\":{\"@id\":\"https:\/\/myoceane.fr\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/myoceane.fr\/wp-content\/uploads\/2020\/06\/poetry.png\",\"datePublished\":\"2020-06-09T08:37:30+00:00\",\"dateModified\":\"2020-06-12T05:43:24+00:00\",\"description\":\"\u4ecb\u7d39\u53e6\u5916\u4e00\u500b Python \u5957\u4ef6\u7528\u65bc\u5957\u4ef6\u7ba1\u7406 - Poetry\uff0c\u76f8\u8f03\u65bc pip \u7684\u7ba1\u7406\u65b9\u5f0f\uff0cpoetry \u7684\u597d\u8655\u5728\u65bc\u7576\u6211\u5011\u522a\u9664\u6389\u67d0\u4e00\u500b\u4e0d\u9700\u8981\u7684 package \u7684\u6642\u5019\uff0c\u6211\u5011\u53ef\u4ee5\u4e5f\u628a\u5176\u4ed6\u76f8\u95dc\u4f46\u662f\u4e0d\u9700\u8981\u7684\u5957\u4ef6\u4e00\u4f75\u522a\u9664\uff0c\u7531\u6b64\u53ef\u4ee5\u7cbe\u7c21\u771f\u6b63\u9700\u8981\u7684 Python \u5957\u4ef6\uff0c\u4e0d\u6703\u904e\u5ea6\u589e\u52a0\u4e0d\u5fc5\u8981\u7684 python \u5957\u4ef6\uff0c\u4ee5\u4e0b\u6211\u5011\u8209\u5be6\u4f8b\u6f14\u91cb\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/myoceane.fr\/index.php\/python-poetry\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/#primaryimage\",\"url\":\"https:\/\/myoceane.fr\/wp-content\/uploads\/2020\/06\/poetry.png\",\"contentUrl\":\"https:\/\/myoceane.fr\/wp-content\/uploads\/2020\/06\/poetry.png\",\"width\":856,\"height\":170},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/myoceane.fr\/index.php\/python-poetry\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/myoceane.fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Python] \u5957\u4ef6\u7ba1\u7406 &#8211; Poetry\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/myoceane.fr\/#website\",\"url\":\"https:\/\/myoceane.fr\/\",\"name\":\"M-Y-Oceane \u60f3\u65b9\u6d89\u6cd5\u3002\u91cf\u74f6\u5916\u7684\u5929\u7a7a\",\"description\":\"\u60f3\u65b9\u6d89\u6cd5, France, Taiwan, Health, Information Technology\",\"publisher\":{\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/myoceane.fr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b\",\"name\":\"\u6ab8\u6aac\u7238\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6cc678684664f8ad45a8d56a6630b183?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6cc678684664f8ad45a8d56a6630b183?s=96&d=mm&r=g\",\"caption\":\"\u6ab8\u6aac\u7238\"},\"logo\":{\"@id\":\"https:\/\/myoceane.fr\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/myoceane.fr\/index.php\/author\/johnny5584767gmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Python] \u5957\u4ef6\u7ba1\u7406 - Poetry - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane","description":"\u4ecb\u7d39\u53e6\u5916\u4e00\u500b Python \u5957\u4ef6\u7528\u65bc\u5957\u4ef6\u7ba1\u7406 - Poetry\uff0c\u76f8\u8f03\u65bc pip \u7684\u7ba1\u7406\u65b9\u5f0f\uff0cpoetry \u7684\u597d\u8655\u5728\u65bc\u7576\u6211\u5011\u522a\u9664\u6389\u67d0\u4e00\u500b\u4e0d\u9700\u8981\u7684 package \u7684\u6642\u5019\uff0c\u6211\u5011\u53ef\u4ee5\u4e5f\u628a\u5176\u4ed6\u76f8\u95dc\u4f46\u662f\u4e0d\u9700\u8981\u7684\u5957\u4ef6\u4e00\u4f75\u522a\u9664\uff0c\u7531\u6b64\u53ef\u4ee5\u7cbe\u7c21\u771f\u6b63\u9700\u8981\u7684 Python \u5957\u4ef6\uff0c\u4e0d\u6703\u904e\u5ea6\u589e\u52a0\u4e0d\u5fc5\u8981\u7684 python \u5957\u4ef6\uff0c\u4ee5\u4e0b\u6211\u5011\u8209\u5be6\u4f8b\u6f14\u91cb\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:\/\/myoceane.fr\/index.php\/python-poetry\/","og_locale":"en_US","og_type":"article","og_title":"[Python] \u5957\u4ef6\u7ba1\u7406 - Poetry - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane","og_description":"\u4ecb\u7d39\u53e6\u5916\u4e00\u500b Python \u5957\u4ef6\u7528\u65bc\u5957\u4ef6\u7ba1\u7406 - Poetry\uff0c\u76f8\u8f03\u65bc pip \u7684\u7ba1\u7406\u65b9\u5f0f\uff0cpoetry \u7684\u597d\u8655\u5728\u65bc\u7576\u6211\u5011\u522a\u9664\u6389\u67d0\u4e00\u500b\u4e0d\u9700\u8981\u7684 package \u7684\u6642\u5019\uff0c\u6211\u5011\u53ef\u4ee5\u4e5f\u628a\u5176\u4ed6\u76f8\u95dc\u4f46\u662f\u4e0d\u9700\u8981\u7684\u5957\u4ef6\u4e00\u4f75\u522a\u9664\uff0c\u7531\u6b64\u53ef\u4ee5\u7cbe\u7c21\u771f\u6b63\u9700\u8981\u7684 Python \u5957\u4ef6\uff0c\u4e0d\u6703\u904e\u5ea6\u589e\u52a0\u4e0d\u5fc5\u8981\u7684 python \u5957\u4ef6\uff0c\u4ee5\u4e0b\u6211\u5011\u8209\u5be6\u4f8b\u6f14\u91cb\u3002","og_url":"https:\/\/myoceane.fr\/index.php\/python-poetry\/","og_site_name":"\u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane","article_published_time":"2020-06-09T08:37:30+00:00","article_modified_time":"2020-06-12T05:43:24+00:00","og_image":[{"width":856,"height":170,"url":"https:\/\/myoceane.fr\/wp-content\/uploads\/2020\/06\/poetry.png","type":"image\/png"}],"author":"\u6ab8\u6aac\u7238","twitter_card":"summary_large_image","twitter_misc":{"Written by":"\u6ab8\u6aac\u7238","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/myoceane.fr\/index.php\/python-poetry\/#article","isPartOf":{"@id":"https:\/\/myoceane.fr\/index.php\/python-poetry\/"},"author":{"name":"\u6ab8\u6aac\u7238","@id":"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b"},"headline":"[Python] \u5957\u4ef6\u7ba1\u7406 &#8211; Poetry","datePublished":"2020-06-09T08:37:30+00:00","dateModified":"2020-06-12T05:43:24+00:00","mainEntityOfPage":{"@id":"https:\/\/myoceane.fr\/index.php\/python-poetry\/"},"wordCount":42,"commentCount":2,"publisher":{"@id":"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b"},"image":{"@id":"https:\/\/myoceane.fr\/index.php\/python-poetry\/#primaryimage"},"thumbnailUrl":"https:\/\/myoceane.fr\/wp-content\/uploads\/2020\/06\/poetry.png","keywords":["Dependency Management","pip","Poetry","Python"],"articleSection":["IT Technology","Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/myoceane.fr\/index.php\/python-poetry\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/myoceane.fr\/index.php\/python-poetry\/","url":"https:\/\/myoceane.fr\/index.php\/python-poetry\/","name":"[Python] \u5957\u4ef6\u7ba1\u7406 - Poetry - \u60f3\u65b9\u6d89\u6cd5 - \u91cf\u74f6\u5916\u7684\u5929\u7a7a M-Y-Oceane","isPartOf":{"@id":"https:\/\/myoceane.fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/myoceane.fr\/index.php\/python-poetry\/#primaryimage"},"image":{"@id":"https:\/\/myoceane.fr\/index.php\/python-poetry\/#primaryimage"},"thumbnailUrl":"https:\/\/myoceane.fr\/wp-content\/uploads\/2020\/06\/poetry.png","datePublished":"2020-06-09T08:37:30+00:00","dateModified":"2020-06-12T05:43:24+00:00","description":"\u4ecb\u7d39\u53e6\u5916\u4e00\u500b Python \u5957\u4ef6\u7528\u65bc\u5957\u4ef6\u7ba1\u7406 - Poetry\uff0c\u76f8\u8f03\u65bc pip \u7684\u7ba1\u7406\u65b9\u5f0f\uff0cpoetry \u7684\u597d\u8655\u5728\u65bc\u7576\u6211\u5011\u522a\u9664\u6389\u67d0\u4e00\u500b\u4e0d\u9700\u8981\u7684 package \u7684\u6642\u5019\uff0c\u6211\u5011\u53ef\u4ee5\u4e5f\u628a\u5176\u4ed6\u76f8\u95dc\u4f46\u662f\u4e0d\u9700\u8981\u7684\u5957\u4ef6\u4e00\u4f75\u522a\u9664\uff0c\u7531\u6b64\u53ef\u4ee5\u7cbe\u7c21\u771f\u6b63\u9700\u8981\u7684 Python \u5957\u4ef6\uff0c\u4e0d\u6703\u904e\u5ea6\u589e\u52a0\u4e0d\u5fc5\u8981\u7684 python \u5957\u4ef6\uff0c\u4ee5\u4e0b\u6211\u5011\u8209\u5be6\u4f8b\u6f14\u91cb\u3002","breadcrumb":{"@id":"https:\/\/myoceane.fr\/index.php\/python-poetry\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/myoceane.fr\/index.php\/python-poetry\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/myoceane.fr\/index.php\/python-poetry\/#primaryimage","url":"https:\/\/myoceane.fr\/wp-content\/uploads\/2020\/06\/poetry.png","contentUrl":"https:\/\/myoceane.fr\/wp-content\/uploads\/2020\/06\/poetry.png","width":856,"height":170},{"@type":"BreadcrumbList","@id":"https:\/\/myoceane.fr\/index.php\/python-poetry\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/myoceane.fr\/"},{"@type":"ListItem","position":2,"name":"[Python] \u5957\u4ef6\u7ba1\u7406 &#8211; Poetry"}]},{"@type":"WebSite","@id":"https:\/\/myoceane.fr\/#website","url":"https:\/\/myoceane.fr\/","name":"M-Y-Oceane \u60f3\u65b9\u6d89\u6cd5\u3002\u91cf\u74f6\u5916\u7684\u5929\u7a7a","description":"\u60f3\u65b9\u6d89\u6cd5, France, Taiwan, Health, Information Technology","publisher":{"@id":"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/myoceane.fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/myoceane.fr\/#\/schema\/person\/4a4552fb8c27693083d465e12db7658b","name":"\u6ab8\u6aac\u7238","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/myoceane.fr\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6cc678684664f8ad45a8d56a6630b183?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6cc678684664f8ad45a8d56a6630b183?s=96&d=mm&r=g","caption":"\u6ab8\u6aac\u7238"},"logo":{"@id":"https:\/\/myoceane.fr\/#\/schema\/person\/image\/"},"url":"https:\/\/myoceane.fr\/index.php\/author\/johnny5584767gmail-com\/"}]}},"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/posts\/5100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/comments?post=5100"}],"version-history":[{"count":67,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/posts\/5100\/revisions"}],"predecessor-version":[{"id":5322,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/posts\/5100\/revisions\/5322"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/media\/5188"}],"wp:attachment":[{"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/media?parent=5100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/categories?post=5100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myoceane.fr\/index.php\/wp-json\/wp\/v2\/tags?post=5100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}