How to install packages with a vcs dependency in their setup.py
See original GitHub issueI’m working on a project at work for which one of the dependencies cannot be published to pypi, so I have to install it with the git url. Unfortunately I can’t paste the setup.py here.
What I am trying to accomplish is to use the Pipfile/Pipfile.lock as a development environment for the tool and then deploy the tool with pip install
. So I’m trying to specify all my dependencies in the setup.py and then just have the -e .
line in my Pipfile. My package installs perfectly fine with pip install .
and pipenv install --skip-lock
. However, pipenv lock
fails with the error (obviously redacted):
pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches packagename@ git+https://GITHUB_TOKEN@github.com/user/repo.git@v0.1.0#egg=packagename from git+https://GITHUB_TOKEN@github.com/user/repo.git@v0.1.0#egg=packagename
No versions found
I know it’s going to be difficult to give specific advice without more information, but I’m hoping you can give me the format and conditions that must be true (does the repo need to be tagged, etc) for pipenv to resolve this dependency the way pip does. Thanks
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:11 (4 by maintainers)
Top GitHub Comments
I have a non-pypi but public github example of this issue, with the same type of setup.py trying to use a git repo as an
install_requires
dependency.I attempt to install my python library using:
pipenv install -e git+https://github.com/itsayellow/mlutils.git#egg=mlutils
This has a dependency to another one of my git repo python libraries,
tictoc
.pip can install mlutils fine, but pipenv fails:
However, pipenv will succeed if I install
tictoc
first using:pipenv install -e git+https://github.com/itsayellow/tictoc.git#egg=tictoc
I can then successfully use pipenv to install
mlutils
that depends on tictoc:pipenv install -e git+https://github.com/itsayellow/mlutils.git#egg=mlutils
So this depends on the order. If I try to install
mlutils
first with pipenv, it fails. But if I install its dependencytictoc
using pipenv first, then a later install ofmlutils
will succeed.https://github.com/itsayellow/mlutils https://github.com/itsayellow/tictoc
@itsayellow I seem to be having precisely the same issue. Could it be that it is not attempting to perform a
-e
installation? If I attempt to install the repo usingpipenv
but without the-e
argument it fails for me in the same way as you are reporting. So, is there some way to tellpipenv
to install some VCS dependency using the-e
flag?