Requirements installation works with pip, but not with pipenv
See original GitHub issueMoving one of project to Pipenv, I’ve noticed that pipenv is having problems parsing the requirements when creating the Pipfile
.
Looks like one of the packages defines gevent<1.1
while we have gevent==1.2.2
inside local.txt
. Not sure why pip
manages to overcome this.
Info
Pipenv version
$ pipenv --version
pipenv, version 7.4.8
Error message
$ pipenv install -r requirements/local.txt
Creating a virtualenv for this project…
⠋Using base prefix '/home/mischi/.local/bin/anaconda3'
New python executable in /home/mischi/.local/bin/anaconda3/envs/django-clock-tDLsdMgK/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/mischi/.virtualenvs/django-clock-tDLsdMgK
Creating a Pipfile for this project…
Requirements file provided! Importing into Pipfile…
No package provided, installing all dependencies.
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
File "/home/mischi/.local/bin/anaconda3/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/home/mischi/.local/bin/anaconda3/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/mischi/.local/bin/anaconda3/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/mischi/.local/bin/anaconda3/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mischi/.local/bin/anaconda3/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mischi/.local/bin/anaconda3/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/mischi/.local/bin/anaconda3/lib/python3.6/site-packages/pipenv/cli.py", line 1595, in install
do_init(dev=dev, allow_global=system, ignore_pipfile=ignore_pipfile, system=system, skip_lock=skip_lock, verbose=verbose, concurrent=concurrent)
File "/home/mischi/.local/bin/anaconda3/lib/python3.6/site-packages/pipenv/cli.py", line 1191, in do_init
do_lock(system=system)
File "/home/mischi/.local/bin/anaconda3/lib/python3.6/site-packages/pipenv/cli.py", line 1025, in do_lock
project=project
File "/home/mischi/.local/bin/anaconda3/lib/python3.6/site-packages/pipenv/utils.py", line 448, in resolve_deps
resolved_tree = resolver.resolve()
File "/home/mischi/.local/lib/python3.6/site-packages/piptools/resolver.py", line 107, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/home/mischi/.local/lib/python3.6/site-packages/piptools/resolver.py", line 187, in _resolve_one_round
best_matches = set(self.get_best_match(ireq) for ireq in constraints)
File "/home/mischi/.local/lib/python3.6/site-packages/piptools/resolver.py", line 187, in <genexpr>
best_matches = set(self.get_best_match(ireq) for ireq in constraints)
File "/home/mischi/.local/lib/python3.6/site-packages/piptools/resolver.py", line 245, in get_best_match
best_match = self.repository.find_best_match(ireq, prereleases=self.prereleases)
File "/home/mischi/.local/lib/python3.6/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 gevent<1.1,==1.2.2
Tried: 0.9.2, 0.9.3, 0.10.0, 0.11.0, 0.11.1, 0.11.2, 0.12.0, 0.12.1, 0.12.2, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.13.4, 0.13.5, 0.13.6, 0.13.7, 0.13.8, 1.0, 1.0.1, 1.0.2, 1.1a1, 1.1a2, 1.1b1, 1.1b2, 1.1b3, 1.1b4, 1.1b5, 1.1b6, 1.1rc1, 1.1rc2, 1.1rc3, 1.1rc4, 1.1rc5, 1.1.0, 1.1.1, 1.1.2, 1.2a1, 1.2a2, 1.2.0, 1.2.0, 1.2.1, 1.2.1, 1.2.2, 1.2.2
What works
$ pipenv --two
$ pipenv shell
$ pip install -r local.txt
What does not work
$ pipenv install -r local.txt
Requirement files
local.txt
# Local development dependencies go here
-r base.txt
coverage==4.4.1
django-coverage-plugin==1.5.0
Sphinx==1.6.3
django-extensions==1.9.1
Werkzeug==0.12.2
django-test-plus==1.0.18
factory-boy==2.9.2
# django-debug-toolbar that works with Django 1.5+
django-debug-toolbar==1.8
# improved REPL
ipython==5.5.0 # pyup: >=5.3.0,<6.0.0
ipdb==0.10.3
# pytest!
pytest-django==3.1.2
pytest-sugar==0.9.0
gevent==1.2.2
# Enables better email testing
maildump==0.5.4
base.txt
# Bleeding edge Django
django==1.11.5
# Configuration
django-environ==0.4.4
whitenoise==3.3.0
# Forms
django-braces==1.11.0
django-crispy-forms==1.6.1
# Models
django-model-utils==3.0.0
# Images
Pillow==4.2.1
# For user registration, either via email or social
# Well-built with regular release cycles!
django-allauth==0.33.0
# Python-PostgreSQL Database Adapter
psycopg2==2.7.3.1
# Unicode slugification
awesome-slugify==1.6.5
# Time zones support
pytz==2017.2
# Your custom requirements go here
django-bootstrap-breadcrumbs==0.8.2
django-bootstrap3==9.0.0
#django-bootstrap3-datetimepicker-2==2.4.2
git+git://github.com/blag/django-bootstrap3-datetimepicker.git@f8a78b231b75c331c143d5461456f663827a8af6#egg=django-bootstrap3-datetimepicker
reportlab==3.4.0
lxml==4.0.0
django-recaptcha==1.3.1
django-taggit==0.22.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
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 install packages for python is not working
The script virtualenv.exe is installed in 'C:\Users\andri\AppData\Roaming\Python\Python37\Scripts' which is not on PATH. Consider adding this ...
Read more >Advanced Usage of Pipenv - Python Packaging Authority
Pipenv allows you to open any Python module that is installed (including ones in your codebase), with the $ pipenv open command: $...
Read more >pipenv Documentation - Read the Docs
Pipenv will install version 1.2 and any minor update, but not 2.0. This will update your Pipfile to reflect this requirement, automatically.
Read more >pipenv · PyPI
You no longer need to use pip and virtualenv separately. They work together. · Managing a requirements. · Hashes are used everywhere, always....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
maildump==0.5.4
asks forgevent<1.1
, and you providegevent==1.2.2
yourself. Given maildump says 1.1 and later won’t work your setup is likely to break in the future. You might want to look for alternatives asap. 😃Thanks for the investigation @uranusjr! I’m not using
maildump
anymore, so I might as well get rid of the package!