List all Pipenv environments

20,619

Solution 1

Why not simply looking for existing virtual environments? To check where they are stored you can activate one virtual env and get its path:

$pipenv shell
$pipenv --venv
 > /path/to/existing_venvs/current_venv
ls /path/to/existing_venvs/
 > cython-pr4GGvfQ/  openCV-f4drK-E5/

I don't know if pipenv can store venvs in other places, but at least for me this is enough to know how many and which venvs I have.

Solution 2

As AChampion said, pipenv has no lsvirtualenv or similar functions.

The creator of pipenv, Kenneth Reitz, told here that is not planned to implement anything of the sort, and that people should rely in other tools like pew.

I've tried pew and pipes and both are good tools, but not the exact tools I was looking for my workflow, so for my personal use I built pipenvwrapper using the base code of virtualenvwrapper.

Some of the supported functions of pipenvwrapper are: workon, lsvirtualenv, cdproject, cdvirtualenv, cdsitepackages, mkproject and rmvirtualenv.

Check if any of those 3 tools fit your needs.

Share:
20,619
Django102
Author by

Django102

Updated on January 04, 2022

Comments

  • Django102
    Django102 over 2 years

    How do you list all Pipenv environments like virtualenv's lsvirtualenv command? The documentation does not say how. Thanks a lot to all for the help given. Cheers!