Using `pipenv shell` after `pipenv install` yields "Shell for UNKNOWN_VIRTUAL_ENVIRONMENT already activated."

Viewed 2484

When I first install packages to a virtual environment with pipenv install package and secondly try to open a subshell to operate in that environment with pipenv shell i receive the following:

"Shell for UNKNOWN_VIRTUAL_ENVIRONMENT already activated. No action taken to avoid nested environments."

However, which python returns the file path of the system python, which indicated that actually the virtual environment is not activated.

ctr+D and recalling pipenv shell finally opens a subshell within the virtual environment. Can someone explain me what's going on there? Honestly, I am severely conufused.

1 Answers

just cd to the folder that has your venv (.venv, Pipfile, Pipfile.lock) and run exit. it will exit the folder and now you can again cd to the same folder and use pipenv shell. it will work

Related