我希望在安装名为“my_utils”的包时,使用pip从私有的github repo安装一个名为“my_tools”的包。
我的setup.py文件内容如下:
from setuptools import setup
setup(
name="my_utils",
version="1.0",
description="Common utility tools",
author="author",
packages=['my_utils'],
include_package_data=True,
python_requires=">=3.6",
install_requires=[
'pandas',
'requests',
'my_tools@git+ssh://git@github.company.com/org/My_Tools.git@2.0'
],
dependency_links=['git+ssh://git@github.company.com/org/My_Tools.git@2.0']
)
我运行了以下命令:
pip install -e .
,并获得以下输出:Requirement already satisfied: pandas ....
Requirement already satisfied: requests ....
ERROR: Could not find a version that satisfies the requirement my-tools (unavailable) (from my-utils) (from versions: none)
ERROR: No matching distribution found for my-tools (unavailable)
补充说明:我还尝试了以下方法,但仍然无效:
install_requires=[
'my_tools @ git+ssh://git@github.company.com/org/My_Tools.git@2.0'
]
git+https://...
URL时,它提示我登录,登录成功,但结果仍然是相同的错误。 - Wassadamo