Python 3.13 下 pip 安装报 metadata-generation-failed 的处理 新版本 Python 推出后的头几个月,装包时最容易撞上的不是编译错误,而是连元数据都生不出来的失败。这类报错看起来指向 numpy,实际上和本地已装的 numpy 关系不大。问题现象Windows 11 + Python 3.13.7,执行:pipinstallpytidycensus报错:Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─ [21 lines of output] error: metadata-generation-failed × Encountered error while generating package metadata. ╰─ numpy note: This is an issue with the package mentioned above, not pip.按提示升级 pip:python.exe