| Feature \ Package Manager | npm | pip | pipenv | poetry |
|-------------------------------------|-----|-----|--------------|----------------|
| Access to main repo (i.e. Pypi/npm) | ✓ | ✓ | ✓ | ✓ |
| Record top level dependencies | ✓ | ✗ | Pipfile | pyproject.toml |
| Record development dependencies | ✓ | ✗ | Pipfile | pyproject.toml |
| Lock versions of all dependencies | ✓ | ✓ | Pipfile.lock | poetry.lock |
| Switch between interpreter versions | nvm | ✗ | ✗ | ✓ |
| Direct publishing | ✓ | ✗ | ✓* | ✓ |
| Run scripts | ✓ | ✗ | Pipfile | ✗ |
| Editable local packages | ✓ | ✓ | ✓ | ✓ |
| Integration with Intellij | ✓ | ✓ | partial | ✗ |
- Directly publishing with
pipenv
is possible if using a 3rd party dev dependency, and a script to tie it all together, see below.
Disclaimer: I only have experiences of these packages managers on 'NIX systems (OSX in particular), pipenv
markets itself as treating Windows is a first class citizen, I'm not sure how this works without pyenv
, which is not available on Windows as far as I am aware.
Basic Usage
pipenv:
To get the most out of pipenv
, pyenv
should be installed. pipenv
will be able to detect and use any version of python installed with pyenv
, even if it is not activated. For example if a Pipfile
has listed python 3.4 as a requirement: to successfully run pipenv install
, pyenv install 3.4.0
should be run first.
To create a new Pipfile
and venv (using python 3.7.x):
>>> pipenv --python 3.7
Or to install dependencies from an existing Pipfile.lock
use the command below. This command can also be used to create a Pipfile
and venv (defaulting to the newest available python version).
>>> pipenv install
To run commands within the created venv:
>>> pipenv run