Open AwesomeDog opened 3 months ago
Have you read https://github.com/direnv/direnv/wiki/Python?
You just need to put this in .envrc
:
layout python
Then it will create the virtual environment within .direnv/python-$python_version
(not ./venv
like you might be used to)
And you can override the name of the virtual environment to .venv
if you like:
export VIRTUAL_ENV=."venv"
layout python
Is your feature request related to a problem? Please describe. sourcing .envrc files goes fine. But activating python virtualenv requires tedious work.
As far as I have searched, one has to define it in the .envrc file, or something.
Describe the solution you'd like when the directory has
./venv/bin/activate
file, then activate it by default, without any configuration. and deactivate when leaves the directory.Describe alternatives you've considered
Additional context