pipenv: pipenv does not install all extras

Pipenv seems to process only the first element in a list of extras.

Given a folder with the following Pipfile (otherwise empty):

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]

[packages]
apache-airflow = {extras = ["s3", "druid"], version = "==1.8.2"}

[requires]
python_version = "3.5"

pipenv install installs 53 packages. The package pydruid, which is defined in extra druid, is missing.

Given this Pipfile with inverted order of extras:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]

[packages]
apache-airflow = {extras = ["druid", "s3"], version = "==1.8.2"}

[requires]
python_version = "3.5"

pipenv install installs 52 packages. The packages boto and filechunkio, which are defined in extra s3, are missing.

Describe your environment
  1. OS Type: Mac OS 10.13.1
  2. Python version: Python 2.7.10
  3. Pipenv version: pipenv, version 8.3.2

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 26 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@techalchemy not sure to understand if this is also applicable when installing the local project (“.”)… In any cases, shouldn’t we have some warning/raise exception if extras are given but not used ?

The problem still remain by the latest pipenv version 2018.11.26

Pipfile

celery = {version = "*", extras = ["redis"]}

only install celery, the redis is missing

Step #1:   File "/usr/local/lib/python3.6/site-packages/kombu/transport/redis.py", line 1009, in __init__
Step #1:     raise ImportError('Missing redis library (pip install redis)')
Step #1: ImportError: Missing redis library (pip install redis

OK this was definitely broken, can confirm. fix pending

@techalchemy Thanks for the clarification. I think molecule might need a PBR update, anyway. I’ll file upstream. Thanks again!

At a glance, that particular package is built with PBR and it looks like their extras aren’t landing in their wheels correctly, you can see here: https://pypi.org/pypi/molecule/2.19.0/json

Compare that to the requires-dist section here: https://pypi.org/pypi/vistir/0.2.5/json

You can see the extras in the second package. The JSON API only parses requirements from wheels, and there are wheels uploaded from molecule, so that is certainly how you installed it. If the extra isn’t there, pipenv can’t install it. Please file an issue upstream, we have regression tests in place for this.

Does not work with 2018.10.13, but does with 2018.11.14.

@Mokubyow for editable VCS dependencies, extras aren’t resolved into the lockfile (on purpose) – since the package is installed into editable mode, these are moving targets and must be re-resolved on each installation.