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

auto-activation of virtual env? #80

Open
biocyberman opened this issue Oct 11, 2018 · 3 comments
Open

auto-activation of virtual env? #80

biocyberman opened this issue Oct 11, 2018 · 3 comments

Comments

@biocyberman
Copy link

I usually have a env or venv directory which is created by python3 -m venv env. How do I get this virtual environment activated automatically when I open any python script under myapp and its subdirectories. Even more useful I have option set deactivate automatically virtual environment env if I navigate and open python scripts outside of myapp:

 myapp
├── src
│   ├── app.py
├── templates
│   ├── index.html
│   └── login.html
└── env
    ├── bin
    ├── include
    ├── lib
    ├── pip-selfcheck.json
    └── pyvenv.cfg
@jorgenschaefer
Copy link
Owner

This is not supported by default in Elpy.

You can use .dir-locals.el to specify the virtualenv for pyvenv-tracking-mode. Alternatively, you can look at the definition of pyvenv-tracking-mode to get some inspiration on how to do this in your init.el without adding new files to your project (or .gitignore).

Does this help?

@biocyberman
Copy link
Author

Thanks I will check that out.

@captain-kark
Copy link

You can always try this #51 (comment)

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

3 participants