pip install 报错:Versioning for this project requires either an sdist tarball, ...
2020-03-03 23:47 云物互联 阅读(1124) 评论(0) 编辑 收藏 举报问题:Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It’s also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name XXX was given, but was not able to be found.
分析:从问题描述可见由两种可能原因。1 是 Python 项目的上游仓库除了问题。2 是 Python 项目的 Version 字符串不匹配。
解决:
- 可能要更新 distribute
pip install --upgrade distribute
-
可能是 git repo 除了问题,执行
git log
检查 git 工具是否正常。 -
查看 setup.cfg 中的 [metadata] name 和
version_info = pbr.version.VersionInfo('XXX')
是否一致。
转载请注明作者:JmilkFan 范桂飓