Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I manage more than 2 package groups with pipenv?

Tags:

python

pip

pipenv

I'm looking for suggestions on how to use pipenv to manage multiple package groups.

In addition to the base and dev groups, I have test, jupyter and dash.

like image 817
David Resnick Avatar asked Jun 27 '18 11:06

David Resnick


2 Answers

I don't think it's possible. There are only 2 ways to install packages: production (no option) and non-production (option --dev). These two groups are hard-coded in the code.

like image 52
phd Avatar answered Nov 12 '22 16:11

phd


I'd love to see this in official pipenv here. My suggestion would go to have this directory structure.

├── project
└── requirements
    ├── dash
    │   ├── PipFile
    │   └── PipFile.lock
    ├── dev
    │   ├── PipFile
    │   └── PipFile.lock
    ├── jupyter
    │   ├── PipFile
    │   └── PipFile.lock
    └── test
        ├── PipFile
        └── PipFile.lock

and based on what environment you need to work on, you can use after you know where is your virtual env using pipenv --venv or to use a custom venv location https://pipenv.kennethreitz.org/advanced/#custom-virtual-environment-location

like image 32
Ahmed Hosny Avatar answered Nov 12 '22 18:11

Ahmed Hosny