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 run doesn't set the $VIRTUAL_ENV environment variable #829

Closed
tgrant59 opened this Issue Oct 4, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@tgrant59

tgrant59 commented Oct 4, 2017

Summary

When you use the Pipenv shell, it sets an environment variable, VIRTUAL_ENV. This is relied upon by some 3rd party packages, namely Zappa, to work properly.

But when you use pipenv run to run Zappa, it can't find the VIRTUAL_ENV variable, and ends up not working correctly.

I think that both commands should maintain the same execution environment for subcommands, including having the same set of environment variables.

To Replicate

Within shell

$ pipenv shell
$ echo $VIRTUAL_ENV
>>> /Users/user/.local/share/virtualenvs/venv-2ki7vM9W

Using the run command

$ pipenv run echo $VIRTUAL_ENV
>>>
@nonylene

This comment has been minimized.

Show comment
Hide comment
@nonylene

nonylene Oct 5, 2017

Contributor

This is because activate_this.py does not set VIRTUAL_ENV. I have opened a pull request on pypa/virtualenv ( pypa/virtualenv#1057 ), but no response yet.

Contributor

nonylene commented Oct 5, 2017

This is because activate_this.py does not set VIRTUAL_ENV. I have opened a pull request on pypa/virtualenv ( pypa/virtualenv#1057 ), but no response yet.

@kennethreitz

This comment has been minimized.

Show comment
Hide comment
@kennethreitz

kennethreitz Oct 6, 2017

Contributor

this is not a pipenv issue

Contributor

kennethreitz commented Oct 6, 2017

this is not a pipenv issue

@frankier

This comment has been minimized.

Show comment
Hide comment
@frankier

frankier Jan 31, 2018

Workaround: replace $VIRTUAL_ENV with `pipenv --venv`

frankier commented Jan 31, 2018

Workaround: replace $VIRTUAL_ENV with `pipenv --venv`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment