jazzband / pip-tools

A set of tools to keep your pinned Python dependencies fresh.
https://pip-tools.rtfd.io
BSD 3-Clause "New" or "Revised" License
7.74k stars 612 forks source link

Unexpected piptools.exceptions.NoCandidateFound based on -e #562

Closed philfreo closed 7 years ago

philfreo commented 7 years ago

Trying to use pipenv causes an unexcepted NoCandidatesFound piptools error. I was sent here from https://github.com/kennethreitz/pipenv/issues/468 (cc @kennethreitz) and have simplified to a reproducible case below.

It seems that the -e syntax is not properly being respected for pinning my desired version of Flask-SQLAlchemy.

Environment

requirements.txt:

Flask==0.9
-e git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=Flask-SQLAlchemy
flask-migrate==1.8.0

Expected

Running pipenv install should work, installing Flask==0.9, flask-migrate==1.8.0, and Flask-SQLAlchemy to my forked version of 2.1.

Actual

Error, as shown below.

Steps:

$ pipenv install        
No package provided, installing all dependencies.
Pipfile found at /Users/p/Sites/foo/p/Pipfile.
  Considering this to be the project home.
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
  File "/Users/philfreo/Library/Python/2.7/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/cli.py", line 1422, in install
    do_init(dev=dev, allow_global=system, ignore_pipfile=ignore_pipfile, system=system, skip_lock=skip_lock, verbose=verbose)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/cli.py", line 1062, in do_init
    do_lock(system=system)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/cli.py", line 901, in do_lock
    python=python_version(which('python', allow_global=system))
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/utils.py", line 112, in resolve_deps
    resolved_tree = resolver.resolve()
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 187, in _resolve_one_round
    best_matches = set(self.get_best_match(ireq) for ireq in constraints)
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 187, in <genexpr>
    best_matches = set(self.get_best_match(ireq) for ireq in constraints)
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 245, in get_best_match
    best_match = self.repository.find_best_match(ireq, prereleases=self.prereleases)
  File "/usr/local/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 116, in find_best_match
    raise NoCandidateFound(ireq, all_candidates)
piptools.exceptions.NoCandidateFound: Could not find a version that matches Flask==0.9,>=0.10,>=0.9
Tried: 0.1, 0.2, 0.3, 0.3.1, 0.4, 0.5, 0.5.1, 0.5.2, 0.6, 0.6.1, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.9, 0.10, 0.10.1, 0.11, 0.11, 0.11.1, 0.11.1, 0.12, 0.12, 0.12.1, 0.12.1, 0.12.2, 0.12.2

Piptools seems to not be respecting the -e line and instead is pulling the non-forked version of Flask-SQLAlchemy which requires Flask >=0.10 instead of my fork which only requires Flask>=0.9.

vphilippon commented 7 years ago

To isolate the issue, could you try performing a pip-compile -v of that requirements.txt (preferably named requirements.in to avoid overwriting it with your test)? That should give us some more information, and also figure out where the issue is coming from. I've been using -e requirements daily with pip-tools, with no issue like this, so there's some digging to do.

As a sidenote, I should mention that pip-tools have been locked out of any releases for over 3 months (see jazzband/roadies/issues/64), and we have no idea of how long the situation will persist. This could be an issue for pipenv if this persists, @kennethreitz.

philfreo commented 7 years ago

I renamed the above requirements.txt to requirements.in and ran pip-compile -v requirements.in and interestingly it worked without issue. All 3 requirements did what I wanted in Round 1 (where as with pipenv lock --verbose the -e requirements never showed up in Round 1's Current Constraints), and the process completed without error. What does that tell us?

$ pip-compile -v requirements.in 
Using indexes:
  https://pypi.python.org/simple

                          ROUND 1                           
Current constraints:
  Flask==0.9
  flask-migrate==1.8.0
  Flask-SQLAlchemy from git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=Flask-SQLAlchemy (from -r requirements.in (line 2))

Finding the best candidates:
  found candidate flask==0.9 (constraint was ==0.9)
  found candidate flask-migrate==1.8.0 (constraint was ==1.8.0)
  found candidate -e git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=Flask-SQLAlchemy (constraint was <any>)

Finding secondary dependencies:
  flask==0.9                requires Jinja2>=2.4, Werkzeug>=0.7
  flask-migrate==1.8.0      requires alembic>=0.6, Flask-Script>=0.6, Flask-SQLAlchemy>=1.0, Flask>=0.9
No handlers could be found for logger "pip.vcs.git"

New dependencies found in this round:
  adding [u'alembic', '>=0.6', '[]']
  adding [u'flask', '>=0.9', '[]']
  adding [u'flask-script', '>=0.6', '[]']
  adding [u'flask-sqlalchemy', '>=1.0', '[]']
  adding [u'jinja2', '>=2.4', '[]']
  adding [u'sqlalchemy', '>=0.7', '[]']
  adding [u'werkzeug', '>=0.7', '[]']
Removed dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable

                          ROUND 2                           
Current constraints:
  alembic>=0.6
  Flask==0.9,>=0.9
  flask-migrate==1.8.0
  Flask-Script>=0.6
  Flask-SQLAlchemy from git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=Flask-SQLAlchemy (from -r requirements.in (line 2))
  Jinja2>=2.4
  SQLAlchemy>=0.7
  Werkzeug>=0.7

Finding the best candidates:
  found candidate alembic==0.9.5 (constraint was >=0.6)
  found candidate flask==0.9 (constraint was ==0.9,>=0.9)
  found candidate flask-migrate==1.8.0 (constraint was ==1.8.0)
  found candidate flask-script==2.0.6 (constraint was >=0.6)
  found candidate -e git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=Flask-SQLAlchemy (constraint was <any>)
  found candidate jinja2==2.9.6 (constraint was >=2.4)
  found candidate sqlalchemy==1.1.14 (constraint was >=0.7)
  found candidate werkzeug==0.12.2 (constraint was >=0.7)

Finding secondary dependencies:
  flask-migrate==1.8.0      requires alembic>=0.6, Flask-Script>=0.6, Flask-SQLAlchemy>=1.0, Flask>=0.9
  sqlalchemy==1.1.14        requires -
  alembic==0.9.5            requires Mako, python-dateutil, python-editor>=0.3, SQLAlchemy>=0.7.6
  jinja2==2.9.6             requires MarkupSafe>=0.23
  werkzeug==0.12.2          requires -
  flask-script==2.0.6       requires Flask
  flask==0.9                requires Jinja2>=2.4, Werkzeug>=0.7

New dependencies found in this round:
  adding [u'mako', '', '[]']
  adding [u'markupsafe', '>=0.23', '[]']
  adding [u'python-dateutil', '', '[]']
  adding [u'python-editor', '>=0.3', '[]']
  adding [u'sqlalchemy', '>=0.7,>=0.7.6', '[]']
Removed dependencies in this round:
  removing [u'sqlalchemy', '>=0.7', '[]']
------------------------------------------------------------
Result of round 2: not stable

                          ROUND 3                           
Current constraints:
  alembic>=0.6
  Flask==0.9,>=0.9
  flask-migrate==1.8.0
  Flask-Script>=0.6
  Flask-SQLAlchemy from git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=Flask-SQLAlchemy (from -r requirements.in (line 2))
  Jinja2>=2.4
  Mako
  MarkupSafe>=0.23
  python-dateutil
  python-editor>=0.3
  SQLAlchemy>=0.7,>=0.7.6
  Werkzeug>=0.7

Finding the best candidates:
  found candidate alembic==0.9.5 (constraint was >=0.6)
  found candidate flask==0.9 (constraint was ==0.9,>=0.9)
  found candidate flask-migrate==1.8.0 (constraint was ==1.8.0)
  found candidate flask-script==2.0.6 (constraint was >=0.6)
  found candidate -e git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=Flask-SQLAlchemy (constraint was <any>)
  found candidate jinja2==2.9.6 (constraint was >=2.4)
  found candidate mako==1.0.7 (constraint was <any>)
  found candidate markupsafe==1.0 (constraint was >=0.23)
  found candidate python-dateutil==2.6.1 (constraint was <any>)
  found candidate python-editor==1.0.3 (constraint was >=0.3)
  found candidate sqlalchemy==1.1.14 (constraint was >=0.7,>=0.7.6)
  found candidate werkzeug==0.12.2 (constraint was >=0.7)

Finding secondary dependencies:
  mako==1.0.7 not in cache, need to check index
  mako==1.0.7               requires MarkupSafe>=0.9.2
  jinja2==2.9.6             requires MarkupSafe>=0.23
  werkzeug==0.12.2          requires -
  python-editor==1.0.3      requires -
  flask-script==2.0.6       requires Flask
  flask-migrate==1.8.0      requires alembic>=0.6, Flask-Script>=0.6, Flask-SQLAlchemy>=1.0, Flask>=0.9
  alembic==0.9.5            requires Mako, python-dateutil, python-editor>=0.3, SQLAlchemy>=0.7.6
  python-dateutil==2.6.1    requires six>=1.5
  markupsafe==1.0           requires -
  flask==0.9                requires Jinja2>=2.4, Werkzeug>=0.7
  sqlalchemy==1.1.14        requires -

New dependencies found in this round:
  adding [u'markupsafe', '>=0.23,>=0.9.2', '[]']
  adding [u'six', '>=1.5', '[]']
Removed dependencies in this round:
  removing [u'markupsafe', '>=0.23', '[]']
------------------------------------------------------------
Result of round 3: not stable

                          ROUND 4                           
Current constraints:
  alembic>=0.6
  Flask==0.9,>=0.9
  flask-migrate==1.8.0
  Flask-Script>=0.6
  Flask-SQLAlchemy from git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=Flask-SQLAlchemy (from -r requirements.in (line 2))
  Jinja2>=2.4
  Mako
  MarkupSafe>=0.23,>=0.9.2
  python-dateutil
  python-editor>=0.3
  six>=1.5
  SQLAlchemy>=0.7,>=0.7.6
  Werkzeug>=0.7

Finding the best candidates:
  found candidate alembic==0.9.5 (constraint was >=0.6)
  found candidate flask==0.9 (constraint was ==0.9,>=0.9)
  found candidate flask-migrate==1.8.0 (constraint was ==1.8.0)
  found candidate flask-script==2.0.6 (constraint was >=0.6)
  found candidate -e git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=Flask-SQLAlchemy (constraint was <any>)
  found candidate jinja2==2.9.6 (constraint was >=2.4)
  found candidate mako==1.0.7 (constraint was <any>)
  found candidate markupsafe==1.0 (constraint was >=0.23,>=0.9.2)
  found candidate python-dateutil==2.6.1 (constraint was <any>)
  found candidate python-editor==1.0.3 (constraint was >=0.3)
  found candidate six==1.11.0 (constraint was >=1.5)
  found candidate sqlalchemy==1.1.14 (constraint was >=0.7,>=0.7.6)
  found candidate werkzeug==0.12.2 (constraint was >=0.7)

Finding secondary dependencies:
  jinja2==2.9.6             requires MarkupSafe>=0.23
  python-editor==1.0.3      requires -
  flask-script==2.0.6       requires Flask
  python-dateutil==2.6.1    requires six>=1.5
  sqlalchemy==1.1.14        requires -
  alembic==0.9.5            requires Mako, python-dateutil, python-editor>=0.3, SQLAlchemy>=0.7.6
  mako==1.0.7               requires MarkupSafe>=0.9.2
  werkzeug==0.12.2          requires -
  flask==0.9                requires Jinja2>=2.4, Werkzeug>=0.7
  markupsafe==1.0           requires -
  flask-migrate==1.8.0      requires alembic>=0.6, Flask-Script>=0.6, Flask-SQLAlchemy>=1.0, Flask>=0.9
  six==1.11.0               requires -
------------------------------------------------------------
Result of round 4: stable, done

#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --output-file requirements.txt requirements.in
#
-e git+ssh://git@github.com/closeio/flask-sqlalchemy.git@1556d1822c46019e518707af0adc034ad4363ab4#egg=Flask-SQLAlchemy  # via flask-migrate
alembic==0.9.5            # via flask-migrate
flask-migrate==1.8.0
flask-script==2.0.6       # via flask-migrate
flask==0.9                # via flask-migrate, flask-script
jinja2==2.9.6             # via flask
mako==1.0.7               # via alembic
markupsafe==1.0           # via jinja2, mako
python-dateutil==2.6.1    # via alembic
python-editor==1.0.3      # via alembic
six==1.11.0               # via python-dateutil
sqlalchemy==1.1.14        # via alembic
werkzeug==0.12.2          # via flask
vphilippon commented 7 years ago

That would point out there's a difference between how the pip-compile script and pipenv interact with the Resolver. From the top of my head and a really quick glance at pipenv's code, I'd bet the difference is with how the editable requirements object is defines/created/handled on pipenv's side before passing it to the Resolver.

If I compare: https://github.com/kennethreitz/pipenv/blob/975b8911cc2341db95392dee582f9fe502f8f925/pipenv/utils.py#L105

and https://github.com/jazzband/pip-tools/blob/2439a7f586f336c19dae513efbdf3e4dba2c9698/piptools/scripts/compile.py#L172

pipenv uses pip.req.InstallRequirement.from_editable directly, pip-tools uses pip.req.parse_requirements instead.

I don't have the time to go through pip's code right now, but IIRC, it's not as straightforward as parse_requirements calling InstallRequirement.from_editable for lines starting with -e.

kennethreitz commented 7 years ago

I will experiment with that.

kennethreitz commented 7 years ago

this is now fixed in pipenv.

Please note that Flask==0.9 has a bug in its setup.py file, and will cause an exception. Any other version works fine, though.

kennethreitz commented 7 years ago

thanks for the help, @vphilippon!

davidovich commented 7 years ago

Good call @vphilippon :-) Le mar. 19 sept. 2017 à 18:59, Kenneth Reitz notifications@github.com a écrit :

thanks for the help, @vphilippon https://github.com/vphilippon!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jazzband/pip-tools/issues/562#issuecomment-330604806, or mute the thread https://github.com/notifications/unsubscribe-auth/ABX6cvnrbAOnHReveNl9vyg5uU1h_1tBks5sj_MHgaJpZM4PbjwT .

philfreo commented 7 years ago

@kennethreitz On pipenv 7.3.2 the -e requirement shown above still doesn't show up in pipenv lock --verbose like it does with pip-compile -v. The same error is shown, and because of the verbose output is still missing the -e, I'm inclined to think this isn't just due to a Flask 0.9 issue?

Separately, can you share (or link me to) more details about what's wrong with Flask 0.9's setup.py?

$ pipenv lock --verbose
Locking [dev-packages] dependencies…

                          ROUND 1                           
Current constraints:

Finding the best candidates:

Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done
Locking [packages] dependencies…

                          ROUND 1                           
Current constraints:
  Flask==0.9
  Flask-Migrate==1.8.0

Finding the best candidates:
  found candidate flask==0.9 (constraint was ==0.9)
  found candidate flask-migrate==1.8.0 (constraint was ==1.8.0)

Finding secondary dependencies:
  flask-migrate==1.8.0      requires alembic>=0.6, Flask-Script>=0.6, Flask-SQLAlchemy>=1.0, Flask>=0.9
  flask==0.9                requires Jinja2>=2.4, Werkzeug>=0.7

New dependencies found in this round:
  adding [u'alembic', '>=0.6', '[]']
  adding [u'flask', '>=0.9', '[]']
  adding [u'flask-script', '>=0.6', '[]']
  adding [u'flask-sqlalchemy', '>=1.0', '[]']
  adding [u'jinja2', '>=2.4', '[]']
  adding [u'werkzeug', '>=0.7', '[]']
Removed dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable

                          ROUND 2                           
Current constraints:
  alembic>=0.6
  Flask==0.9,>=0.9
  Flask-Migrate==1.8.0
  Flask-Script>=0.6
  Flask-SQLAlchemy>=1.0
  Jinja2>=2.4
  Werkzeug>=0.7

Finding the best candidates:
  found candidate alembic==0.9.5 (constraint was >=0.6)
  found candidate flask==0.9 (constraint was ==0.9,>=0.9)
  found candidate flask-migrate==1.8.0 (constraint was ==1.8.0)
  found candidate flask-script==2.0.6 (constraint was >=0.6)
  found candidate flask-sqlalchemy==2.2 (constraint was >=1.0)
  found candidate jinja2==2.9.6 (constraint was >=2.4)
  found candidate werkzeug==0.12.2 (constraint was >=0.7)

Finding secondary dependencies:
  jinja2==2.9.6             requires MarkupSafe>=0.23
  flask==0.9                requires Jinja2>=2.4, Werkzeug>=0.7
  flask-migrate==1.8.0      requires alembic>=0.6, Flask-Script>=0.6, Flask-SQLAlchemy>=1.0, Flask>=0.9
  flask-script==2.0.6       requires Flask
  werkzeug==0.12.2          requires -
  flask-sqlalchemy==2.2     requires Flask>=0.10, SQLAlchemy>=0.8.0
  alembic==0.9.5            requires Mako, python-dateutil, python-editor>=0.3, SQLAlchemy>=0.7.6

New dependencies found in this round:
  adding [u'flask', '>=0.10,>=0.9', '[]']
  adding [u'mako', '', '[]']
  adding [u'markupsafe', '>=0.23', '[]']
  adding [u'python-dateutil', '', '[]']
  adding [u'python-editor', '>=0.3', '[]']
  adding [u'sqlalchemy', '>=0.7.6,>=0.8.0', '[]']
Removed dependencies in this round:
  removing [u'flask', '>=0.9', '[]']
------------------------------------------------------------
Result of round 2: not stable

                          ROUND 3                           
Current constraints:
  alembic>=0.6
  Flask==0.9,>=0.10,>=0.9
  Flask-Migrate==1.8.0
  Flask-Script>=0.6
  Flask-SQLAlchemy>=1.0
  Jinja2>=2.4
  Mako
  MarkupSafe>=0.23
  python-dateutil
  python-editor>=0.3
  SQLAlchemy>=0.7.6,>=0.8.0
  Werkzeug>=0.7

Finding the best candidates:
  found candidate alembic==0.9.5 (constraint was >=0.6)
Traceback (most recent call last):
  File "/Users/philfreo/Library/Python/2.7/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/cli.py", line 1619, in lock
    do_lock(verbose=verbose, clear=clear)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/cli.py", line 944, in do_lock
    project=project
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/utils.py", line 160, in resolve_deps
    resolved_tree = resolver.resolve()
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 187, in _resolve_one_round
    best_matches = set(self.get_best_match(ireq) for ireq in constraints)
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 187, in <genexpr>
    best_matches = set(self.get_best_match(ireq) for ireq in constraints)
  File "/usr/local/lib/python2.7/site-packages/piptools/resolver.py", line 245, in get_best_match
    best_match = self.repository.find_best_match(ireq, prereleases=self.prereleases)
  File "/usr/local/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 116, in find_best_match
    raise NoCandidateFound(ireq, all_candidates)
piptools.exceptions.NoCandidateFound: Could not find a version that matches Flask==0.9,>=0.10,>=0.9
Tried: 0.1, 0.2, 0.3, 0.3.1, 0.4, 0.5, 0.5.1, 0.5.2, 0.6, 0.6.1, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.9, 0.10, 0.10.1, 0.11, 0.11, 0.11.1, 0.11.1, 0.12, 0.12, 0.12.1, 0.12.1, 0.12.2, 0.12.2
kennethreitz commented 7 years ago

try again with latest

philfreo commented 7 years ago

pipenv, version 7.3.6

Two new errors. This:

$ pipenv install 
Requirements.txt found, instead of Pipfile! Converting…
Warning: Your Pipfile now contains pinned versions, if your requirements.txt did. 
We recommend updating your Pipfile to specify the "*" version, instead.
No package provided, installing all dependencies.
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
No handlers could be found for logger "pip.vcs.git"
Updated Pipfile.lock!
Installing dependencies from Pipfile.lock…
An error occured while installing flask-sqlalchemy==! Will try again.
  🐍   ❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒ 13/13 — 00:00:04
Installing initially–failed dependencies…
Collecting flask-sqlalchemy== ❒❒❒❒❒❒❒ 0/1 — 00:00:00

  Could not find a version that satisfies the requirement flask-sqlalchemy== (from -r /var/folders/gk/89t674fx4q54nlmvl9yyflnw0000gn/T/pipenv-8Pt4Ri-requirement.txt (line 1)) (from versions: 0.5, 0.6, 0.9, 0.9.1, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 1.0, 2.0, 2.1, 2.2)
No matching distribution found for flask-sqlalchemy== (from -r /var/folders/gk/89t674fx4q54nlmvl9yyflnw0000gn/T/pipenv-8Pt4Ri-requirement.txt (line 1))

  ☤  ❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒❒ 0/1 — 00:00:00

And:

$ pipenv lock --verbose
Locking [dev-packages] dependencies…

                          ROUND 1                           
Current constraints:

Finding the best candidates:

Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done
Locking [packages] dependencies…
Traceback (most recent call last):
  File "/Users/philfreo/Library/Python/2.7/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/cli.py", line 1617, in lock
    do_lock(verbose=verbose, clear=clear)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/cli.py", line 942, in do_lock
    project=project
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/utils.py", line 133, in resolve_deps
    extra_constraints = best_matches_from(dep[len('-e '):], which=which, which_pip=which_pip, project=project)
  File "/Users/philfreo/Library/Python/2.7/lib/python/site-packages/pipenv/utils.py", line 106, in best_matches_from
    setup_py_path = os.path.abspath(os.sep.join([result, 'setup.py']))
TypeError: sequence item 0: expected string, NoneType found

which looks like the same as https://github.com/kennethreitz/pipenv/issues/512#issuecomment-330670460

codefo commented 7 years ago

I have the same issue, but I'm trying to install graphene-django

$ pipenv install graphene-django==2.0.dev2017083101
...
piptools.exceptions.NoCandidateFound: Could not find a version that matches graphene>=2.0.dev

As you can see piptools cant find graphene>=2.0.dev while PyPI contains it.

My pipenv and python versiosn:

$ python --version
Python 3.6.2
$ pipenv --version
pipenv, version 7.3.6
philfreo commented 7 years ago

Closing since the pip-tools error no longer happens. However the pipenv problems remains, I opened https://github.com/kennethreitz/pipenv/issues/671