Skip to content
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
Closed

pipenv run doesn't set the $VIRTUAL_ENV environment variable #829

tgrant59 opened this issue Oct 4, 2017 · 3 comments

Comments

@tgrant59
Copy link

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
Copy link
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
Copy link
Contributor

this is not a pipenv issue

@frankier
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants