Skip to content

Is there a way to set environment variables for each version? #263

Closed
@RobRoseKnows

Description

@RobRoseKnows

I'd like to be able to set environment variables specific to each virtualenv created by pyenv when I enter a directory. I found Issue #55 that seems to mention this and says it's not currently supported, but it's also from 2014, so I was wondering if anything has changed since then.

I tried adding export statements to ~/.pyenv/versions/3.6.5/envs/my-env/bin/activate (where my-env is a local 3.6.5 virtualenv set in the .python-version file) but they didn't get set. I'm planning on trying direnv as suggested in issue #55, but I was wondering if pyenv now has native support for this, or if such support is planned in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions