<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PyPI on Chen Kai Blog</title><link>https://www.chenk.top/zh/tags/pypi/</link><description>Recent content in PyPI on Chen Kai Blog</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Sun, 24 Apr 2022 09:00:00 +0000</lastBuildDate><atom:link href="https://www.chenk.top/zh/tags/pypi/index.xml" rel="self" type="application/rss+xml"/><item><title>Python 工程实践（七）：打包分发 —— 从 pip install 到 PyPI</title><link>https://www.chenk.top/zh/python-engineering/07-packaging-and-distribution/</link><pubDate>Sun, 24 Apr 2022 09:00:00 +0000</pubDate><guid>https://www.chenk.top/zh/python-engineering/07-packaging-and-distribution/</guid><description>&lt;p>你写了一个实用的小工具，同事找你要。你把文件夹打包成 ZIP 发过去，对方解压后运行 &lt;code>python main.py&lt;/code>，却报了 &lt;code>ModuleNotFoundError&lt;/code> —— 因为缺少依赖。他手动装上依赖，结果版本不对；更糟的是，他用的是 Python 3.8，而你的代码里用了 f-string 中的海象运算符（walrus operator），这在 3.8 里根本跑不了。&lt;/p></description></item></channel></rss>