You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deactivating a virtual environment created by pipenv shell and then trying to reactivate it using pipenv shell, I receive the error:
Shell for UNKNOWN_VIRTUAL_ENVIRONMENT already activated.
New shell not activated to avoid nested environments.
However, running unset PIPENV_ACTIVE resolves the issue. Modifying the deactivate function in the virtual environment's activate script to include unset PIPENV_ACTIVE also works.
Expected result
The virtual environment should reactivate without errors when running pipenv shell after deactivating it.
Actual result
The error message is displayed, and the virtual environment is not reactivated.
Steps to replicate
Create and activate a virtual environment using pipenv shell.
Deactivate the environment using the deactivate command.
Attempt to reactivate the environment using pipenv shell.
System details
OS: Darwin Machinename.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:17:33 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6031 arm64
pyenv version: pyenv 2.4.7
pipenv version: pipenv, version 2024.0.1
Python version: Python 3.12.4
Additional information
To resolve the issue temporarily, adding unset PIPENV_ACTIVE to the deactivate function in the virtual environment's activate script works. However, this seems to be an issue with pipenv itself.
Issue description
When deactivating a virtual environment created by
pipenv shell
and then trying to reactivate it usingpipenv shell
, I receive the error:However, running
unset PIPENV_ACTIVE
resolves the issue. Modifying thedeactivate
function in the virtual environment'sactivate
script to includeunset PIPENV_ACTIVE
also works.Expected result
The virtual environment should reactivate without errors when running
pipenv shell
after deactivating it.Actual result
The error message is displayed, and the virtual environment is not reactivated.
Steps to replicate
pipenv shell
.deactivate
command.pipenv shell
.System details
Additional information
To resolve the issue temporarily, adding
unset PIPENV_ACTIVE
to thedeactivate
function in the virtual environment'sactivate
script works. However, this seems to be an issue with pipenv itself.pipenv_support.md
The text was updated successfully, but these errors were encountered: