pyvenv
                                
                                 pyvenv copied to clipboard
                                
                                    pyvenv copied to clipboard
                            
                            
                            
                        auto-activation of virtual env?
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
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?
Thanks I will check that out.
You can always try this https://github.com/jorgenschaefer/pyvenv/issues/51#issuecomment-474785730