{"action":"opened","issue":{"url":"https://api.github.com/repos/direnv/direnv/issues/344","repository_url":"https://api.github.com/repos/direnv/direnv","labels_url":"https://api.github.com/repos/direnv/direnv/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/direnv/direnv/issues/344/comments","events_url":"https://api.github.com/repos/direnv/direnv/issues/344/events","html_url":"https://github.com/direnv/direnv/issues/344","id":301910168,"number":344,"title":"Direnv broken after upgrading python to python 3 using Homebrew (solution inside)","user":{"login":"dharmab","id":4450708,"avatar_url":"https://avatars3.githubusercontent.com/u/4450708?v=4","gravatar_id":"","url":"https://api.github.com/users/dharmab","html_url":"https://github.com/dharmab","followers_url":"https://api.github.com/users/dharmab/followers","following_url":"https://api.github.com/users/dharmab/following{/other_user}","gists_url":"https://api.github.com/users/dharmab/gists{/gist_id}","starred_url":"https://api.github.com/users/dharmab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dharmab/subscriptions","organizations_url":"https://api.github.com/users/dharmab/orgs","repos_url":"https://api.github.com/users/dharmab/repos","events_url":"https://api.github.com/users/dharmab/events{/privacy}","received_events_url":"https://api.github.com/users/dharmab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-02T21:26:27Z","updated_at":"2018-03-02T21:26:27Z","closed_at":null,"author_association":"NONE","body":"## Issue description\r\n\r\nHomebrew's `python` formula has switch to Python 3. This requires manual intervention for Python 2 projects.\r\n\r\n### Steps to reproduce\r\n\r\nIf a user uses Python from Homebrew and runs `brew upgrade`, their Python 2 direnv environments will output the following error:\r\n\r\n```\r\ndirenv: loading .envrc\r\nenvironment: line 400: /usr/local/opt/python/bin/python2.7: No such file or directory\r\n```\r\n\r\nTo work around this error, upgrade virtualenv:\r\n```\r\n# Run this _outside_ of a virtualenv\r\npip install virtualenv\r\n```\r\n\r\nand update `.envrc`:\r\n\r\n```\r\n# before\r\nlayout python\r\n# after\r\nlayout python /usr/local/opt/python@2/bin/python2\r\n```\r\n\r\n## Technical details\r\n\r\n<!-- to better help you, please provide the following information: -->\r\n\r\n* `direnv version`: 2.15.2\r\n* OS release: macOS High Sierra 10.13.3\r\n* Homebrew version: 1.5.7\r\n\r\n(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.)"}}
{"actor":{"display_login":"dharmab"}}