install_requires=[
'private_package_name==1.1',
],
dependency_links=[
'git+ssh://git@github.com/username/private_repo.git#egg=private_package_name-1.1',
]
注意:
egg名后面必须有版本号,否则可能找不到包,更多参考:
python-setuptools-how-can-i-list-a-private-repository-under-install-requires
本文详细介绍了如何在Python项目中正确配置私有依赖包的安装,包括使用install_requires和dependency_links参数来指定私有仓库的位置和包的版本,确保项目能够顺利地从私有仓库中拉取所需的依赖。
3284

被折叠的 条评论
为什么被折叠?



