question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to install packages with a vcs dependency in their setup.py

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
itsayellowcommented, May 28, 2019

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:

[pipenv.exceptions.ResolutionFailure]:       pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches tictoc@ git+https://github.com/itsayellow/tictoc@master from git+https://github.com/itsayellow/tictoc@master
[pipenv.exceptions.ResolutionFailure]:       No versions found

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 dependency tictoc using pipenv first, then a later install of mlutils will succeed.

https://github.com/itsayellow/mlutils https://github.com/itsayellow/tictoc

1reaction
paddiecommented, Apr 8, 2020

@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 using pipenv but without the -e argument it fails for me in the same way as you are reporting. So, is there some way to tell pipenv to install some VCS dependency using the -e flag?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing dependency from a VCS repo subdirectory using ...
Running python3 setup.py install in a virtualenv, I get the following error: Download error on git+ssh://git@host/repo.git@tag#subdirectory= ...
Read more >
How to Package Python dependencies with PIP setuptools
Lay out your project on your local machine using an appropriate directory structure. Create a setup.py script that describes all the metadata ...
Read more >
Dependencies Management in Setuptools
This is where a package declares its core dependencies, without which it won't be able to run. setuptools supports automatically downloading and installing...
Read more >
Installing Packages - Python Packaging User Guide - Python.org
This section covers the basics of how to install Python packages. ... Ensure pip, setuptools, and wheel are up to date ... Installing...
Read more >
Installing Private Python Packages - Read the Docs
Read the Docs uses pip to install your Python packages. If you have private dependencies, you can install them from a private Git...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found