New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipenv is not respecting the current activated virtualenv and creating new env #1021
Comments
Hi @ansrivas! This is not the intended flow of pipenv. Pipenv will use a virtual environment if it finds itself in one initially but not on all subsequent calls. You'd have a rather hairy nest of virtualenvs! If you navigate to a folder that is outside of the project, pipenv will create a new pipfile. If you just want to install some packages outside of the folder, but inside the virutalenvironment you activated in the subshell you could do |
@erinxocon And herein lies the problem: users expect pipenv to be a replacement for pip. @kennethreitz said it himself on the pipenv homepage:
pipenv is supposed to not only create the virtualenv, as you said, but also manage it. Again, it's mentioned explicitly on the homepage (emphasis mine):
In the old days, when we used virtualenv and pip separately, we could navigate to any directory and |
I'm agreeing with @ksze on this. There's an expectation that Along similar lines... I should be able to use the |
Not very sure if this is an expected behavior, but from a usage perspective this appears to be a bug:
Issue:
pipenv install <package_name>
is creating a new virtualenv even though the virtualenv is activated usingpipenv shell
.When does it occur:
if we are not in the same directory where
Pipfile
is located.Describe your environment
$ python -V
== 3.6.3$ pipenv --version
== version 8.3.1Expected result
If we are in an activated virtualenv shell, (irrespective of the
pwd
)pipenv install
should respect it and correctly update thePipfile
and should not create a newPipfile
.Actual result
A new Pipfile gets created, even if in the same activated virtualenv but in a different directory.
Steps to replicate
The text was updated successfully, but these errors were encountered: