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.

Cannot install a pipenv app with a dependency, both hosted on github

See original GitHub issue

I created two small test projects on GitHub to understand how pipenv works. One project is a simple app that uses the other project as dependency. The app project is located here: pipenv-app. The dependency project is located here: pipenv-dependency.

When trying to install the app via $ pipenv install -e git+https://github.com/irgendsontyp/pipenv-app#egg=pipenv-app --verbose in a virtualenv created via $ pipenv --three, I get this output:

⠋Installing '-e git+https://github.com/irgendsontyp/pipenv-app#egg=pipenv-app'
$ "/home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/bin/pip" install  --src /home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/src --verbose   -e "git+https://github.com/irgendsontyp/pipenv-app#egg=pipenv-app" -i https://pypi.python.org/simple --exists-action w
Obtaining pipenv-app from git+https://github.com/irgendsontyp/pipenv-app#egg=pipenv-app
  Cloning https://github.com/irgendsontyp/pipenv-app to /home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/src/pipenv-app
  Running command git clone -q https://github.com/irgendsontyp/pipenv-app /home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/src/pipenv-app
  Running setup.py (path:/home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/src/pipenv-app/setup.py) egg_info for package pipenv-app
    Running command python setup.py egg_info
    running egg_info
    creating pipenv_app.egg-info
    writing pipenv_app.egg-info/PKG-INFO
    writing dependency_links to pipenv_app.egg-info/dependency_links.txt
    writing requirements to pipenv_app.egg-info/requires.txt
    writing top-level names to pipenv_app.egg-info/top_level.txt
    writing manifest file 'pipenv_app.egg-info/SOURCES.txt'
    reading manifest file 'pipenv_app.egg-info/SOURCES.txt'
    writing manifest file 'pipenv_app.egg-info/SOURCES.txt'
  Source in /home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/src/pipenv-app has version 1.0.0, which satisfies requirement pipenv-app from git+https://github.com/irgendsontyp/pipenv-app#egg=pipenv-app
Collecting pipenv-dependency (from pipenv-app)
  1 location(s) to search for versions of pipenv-dependency:
  * https://pypi.python.org/simple/pipenv-dependency/
  Getting page https://pypi.python.org/simple/pipenv-dependency/
  Looking up "https://pypi.python.org/simple/pipenv-dependency/" in the cache
  No cache entry available
  Starting new HTTPS connection (1): pypi.python.org
  "GET /simple/pipenv-dependency/ HTTP/1.1" 404 46
  Status code 404 not in [200, 203, 300, 301]
  Could not fetch URL https://pypi.python.org/simple/pipenv-dependency/: 404 Client Error: Not Found (pipenv-dependency does not exist) for url: https://pypi.python.org/simple/pipenv-dependency/ - skipping
Cleaning up...
Exception information:
Traceback (most recent call last):
  File "/home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/lib/python3.6/site-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/lib/python3.6/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/home/maxx/.local/share/virtualenvs/pipenv-test-rA_KzhnY/lib/python3.6/site-packages/pip/index.py", line 514, in find_requirement
    'No matching distribution found for %s' % req
pip.exceptions.DistributionNotFound: No matching distribution found for pipenv-dependency (from pipenv-app)

Error:  An error occurred while installing -e git+https://github.com/irgendsontyp/pipenv-app#egg=pipenv-app!
  Could not find a version that satisfies the requirement pipenv-dependency (from pipenv-app) (from versions: )
No matching distribution found for pipenv-dependency (from pipenv-app)

What am I doing wrong?

OS: Arch Linux Python -V: Python 3.6.4 Pipenv --version: pipenv, version 9.0.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
uranusjrcommented, Jan 26, 2018

@irgendsontyp I believe the “modern” way to install dependency via Git is through PEP 508 URL-based dependency lookup. Remove the dependency_links entry, and change the install_requires entry from

install_requires=[
    'pipenv-app',
],

to

install_requires=[
    'pipenv-app @ git+https://github.com/irgendsontyp/pipenv-app',
],

I’ve never actually used it myself, to be honest, but it should work.

1reaction
uranusjrcommented, Jan 26, 2018

Donald Stufft (the main person behind all these packaging stuff) published a great blog post on why the Python ecosystem needs two ways to specify dependencies. It was written a few years ago, so he was describing requirements.txt instead of Pipfile, but the idea is the same. The post also describes why exactly dependency_links is bad practice.

https://caremad.io/posts/2013/07/setup-vs-requirement/

Read more comments on GitHub >

github_iconTop Results From Across the Web

pipenv doesn't install GitHub package's dependencies
Try: pipenv lock --clear. this should clear your lock file. It worked for me. After just uninstall and install: pipenv uninstall --all. then...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
pipenv install --ignore-pipfile is nearly equivalent to pipenv sync , but pipenv sync will never attempt to re-lock your dependencies as it is...
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
This is usually a result of mixing Pipenv with system packages. We strongly recommend installing Pipenv in an isolated environment. Uninstall all existing ......
Read more >
Pipenv: promises a lot, delivers very little | Chris Warrick
(If you don't need to lock dependencies, pip + venv will suffice.) ... I create ~/git/website and run pipenv install Django in that...
Read more >
pipenv Documentation - Read the Docs
Installing pipenv via Homebrew or Linuxbrew will keep pipenv and all of its dependencies in an isolated virtual envi- ronment so it doesn't...
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