{"action":"created","issue":{"url":"https://api.github.com/repos/nginx/unit/issues/96","repository_url":"https://api.github.com/repos/nginx/unit","labels_url":"https://api.github.com/repos/nginx/unit/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/nginx/unit/issues/96/comments","events_url":"https://api.github.com/repos/nginx/unit/issues/96/events","html_url":"https://github.com/nginx/unit/issues/96","id":312778484,"number":96,"title":"python virtualenv","user":{"login":"tamarintech","id":3681218,"avatar_url":"https://avatars2.githubusercontent.com/u/3681218?v=4","gravatar_id":"","url":"https://api.github.com/users/tamarintech","html_url":"https://github.com/tamarintech","followers_url":"https://api.github.com/users/tamarintech/followers","following_url":"https://api.github.com/users/tamarintech/following{/other_user}","gists_url":"https://api.github.com/users/tamarintech/gists{/gist_id}","starred_url":"https://api.github.com/users/tamarintech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamarintech/subscriptions","organizations_url":"https://api.github.com/users/tamarintech/orgs","repos_url":"https://api.github.com/users/tamarintech/repos","events_url":"https://api.github.com/users/tamarintech/events{/privacy}","received_events_url":"https://api.github.com/users/tamarintech/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-04-10T05:32:04Z","updated_at":"2018-04-17T10:57:52Z","closed_at":null,"author_association":"NONE","body":"I read from the beta that you could now use virtual environments, but I keep encountering\r\n```Fatal Python error: Py_Initialize: Unable to get the locale encoding\r\nModuleNotFoundError: No module named 'encodings'\r\n```\r\n\r\nI'm assuming this is because the virtualenv isn't quite right since I can use my unitd without a virtualenv and everything seems fine.\r\n\r\nDid I follow the directions incorrectly?\r\n\r\n`working_directory` should be the parent where `home` and `path` are relative. `path` is the path to the virtualenv (ie: python3 -m venv env then \"path\" would be venv). If I omit `working_directory` and set `home` I always get the encodings error even if I set it to a venv directory. No combination of venv works with home or path.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nginx/unit/issues/comments/381948100","html_url":"https://github.com/nginx/unit/issues/96#issuecomment-381948100","issue_url":"https://api.github.com/repos/nginx/unit/issues/96","id":381948100,"user":{"login":"tamarintech","id":3681218,"avatar_url":"https://avatars2.githubusercontent.com/u/3681218?v=4","gravatar_id":"","url":"https://api.github.com/users/tamarintech","html_url":"https://github.com/tamarintech","followers_url":"https://api.github.com/users/tamarintech/followers","following_url":"https://api.github.com/users/tamarintech/following{/other_user}","gists_url":"https://api.github.com/users/tamarintech/gists{/gist_id}","starred_url":"https://api.github.com/users/tamarintech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamarintech/subscriptions","organizations_url":"https://api.github.com/users/tamarintech/orgs","repos_url":"https://api.github.com/users/tamarintech/repos","events_url":"https://api.github.com/users/tamarintech/events{/privacy}","received_events_url":"https://api.github.com/users/tamarintech/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T10:57:52Z","updated_at":"2018-04-17T10:57:52Z","author_association":"NONE","body":"The python2 applications now start with this:\r\n```\r\n  \"applications\": {\r\n    \"demo\": {\r\n      \"type\": \"python2\",\r\n      \"home\": \"/tmp/nginx-playground/unit/env-py2\",\r\n      \"path\": \"/tmp/nginx-playground/unit\",\r\n      \"module\": \"demo_app\",\r\n      \"processes\": 1\r\n    }\r\n```\r\n\r\nHowever, the python3 apps still do not start. I have tried `python 3`, `python 3.6`, `python 3.6.5` and I still receive the Py_initialize error."}}
{"actor":{"display_login":"tamarintech"}}