I have a private Github repo with git uri: "git@github.company.com:Org/My_Repo.git"
It has two tags (versions) v2.0 and v1.0. Version 2 has the same code as the branch "master".
Normally we install into a conda environment like this, and it works fine:
(my-env) $ pip install --upgrade git+ssh://git@github.company.com/Org/My_Repo.git@v2.0
Now I have another branch called "dev" I would like to install from, and run tests. I tried:
(my-env) $ pip install --upgrade git+ssh://git@github.company.com/Org/My_Repo.git@dev
(my-env) $ pip install --upgrade git+ssh://git@github.company.com/Org/My_Repo.git@5d0somehash1234
(my-env) $ pip install --upgrade git+ssh://git@github.company.com/Org/My_Repo.git@dev#egg=my_repo
(I've tried everything here) Aside from the last one, these succeed, however in any case, this fails:
(my-env) $ python -c "from my_repo import ModuleOne"
Error:
Traceback (most recent call last):
....
File "/path/to/miniconda3/envs/my_env/lib/python3.7/site-packages/my_repo/__init__.py", line 1, in <module>
from my_repo.modules.module_one import ModuleOne
ModuleNotFoundError: No module named 'my_repo.modules'
In fact, listing the directory where this installed, I see only the __init__.py was downloaded with the clone, none of the modules!
$ ls /path/to/miniconda3/envs/my_env/lib/python3.7/site-packages/my_repo
__init__.py __pycache__
The init file has lines matching what's in the remote dev branch, but none of the other files made it.
Alternatively, the following works
(my-env) $ git clone git+ssh://git@github.company.com:Org/My_Repo.git
(my-env) $ cd My_Repo
(my-env) $ git checkout dev
(my-env) $ pip install -e .
(my-env) $ cd ~
(my-env) $ python -c "from my_repo import ModuleOne"
Is there any way to get the pip install from the remote to work? I have other platforms in my org that rely on this method. How could it be missing modules? Is there any way to fix?