Skip to content

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

@tgrant59

Description

@tgrant59

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
>>>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions