Get path of virtual environment in pipenv
Adding to Sewagodimo Matlapeng's answer for the second part of the question:
can configure it to use a custom path for newly created virtualenv?
According to documentation, you can set the base location for the virtualenvs with the environment variable WORKON_HOME
. If you want to place the virtualenv specifically in <project>/.venv
, set the environment variable PIPENV_VENV_IN_PROJECT
.
e.g., running:
export WORKON_HOME=/tmppipenv install
Would place the virtualenv in /tmp/<projectname>-<hash>
.