我如何获得Pipenv以安装程序包子依赖项

时间:2020-08-19 17:02:50

标签: python git pipenv

我有一个具有依赖性B(sg_wrapper)的程序包,其本身具有依赖性C(shotgun_api3)。 使用pipenv安装时,我可以访问B(sg_wrapper),但是B本身无法导入C。

这是我的pipfile

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
edl = "*"
timecode="*"
sg_wrapper = {git = "git+https://gitlab.com/kickstartent/sg_wrapper.git", editable=true}

[requires]
python_version = "3.7"

这是B包setup.py

import setuptools

with open("README.md", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name="Shotgun wrapper",
    version="0.0.1",
    author="",
    author_email="",
    description="shotgun wrapper",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="hidden",
    packages=setuptools.find_packages(),
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
    python_requires='>=3.6',
    install_requires=[
        'package_name @ git+https://github.com/shotgunsoftware/python-api.git'
    ]
)

1 个答案:

答案 0 :(得分:1)

您需要输入真实的包裹名称。

install_requires=[
        'package_name @ git+https://github.com/shotgunsoftware/python-api.git'
    ]

但是您改输入package_name !!! ??

例如:

install_requires=[
    pycocotools @ git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI
]