3

I want pip to install a package "my_tools" from a private github repo whenever a package called "my_utils" is to be installed.

My 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']
)

I run: pip install -e . and get:

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)

None of these answers worked: 1, 2, 3

EDIT: I've also tried the following, but still not working:

install_requires=[
    'my_tools @ git+ssh://git@github.company.com/org/My_Tools.git@2.0'
]
Wassadamo
  • 1,176
  • 12
  • 32

1 Answers1

0

Have you tried using http link instead of ssh?

git+http://git@github.company.com/org/My_Tools.git@2.0
Dev98
  • 1
  • 1
  • 3
  • 2
    This should just be a comment to the OP rather than a question as an answer. – amaster Apr 01 '22 at 11:41
  • SSH is best practice for my company. Also when I try a `git+https://...` url, it prompts me to log in, which succeeds, but results in the same error. – Wassadamo Apr 01 '22 at 18:59