opened
dharmab
username_0
## Issue description

Homebrew's `python` formula has switch to Python 3. This requires manual intervention for Python 2 projects.

### Steps to reproduce

If a user uses Python from Homebrew and runs `brew upgrade`, their Python 2 direnv environments will output the following error:

```
direnv: loading .envrc
environment: line 400: /usr/local/opt/python/bin/python2.7: No such file or directory
```

To work around this error, upgrade virtualenv:
```
# Run this _outside_ of a virtualenv
pip install virtualenv
```

and update `.envrc`:

```
# before
layout python
# after
layout python /usr/local/opt/python@2/bin/python2
```

## Technical details

<!-- to better help you, please provide the following information: -->

* `direnv version`: 2.15.2
* OS release: macOS High Sierra 10.13.3
* Homebrew version: 1.5.7

(I don't think this is actually an issue with direnv, but figured that posting the solution here would be easy to find with Google.)
Direnv broken after upgrading python to python 3 using Homebrew (solution inside)
issue
closed
dharmab
username_0
issue
created
dharmab
username_0
Closing this issue since people have had plenty of time to migrate.
comment