{"action":"created","issue":{"url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/173","labels_url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/173/comments","events_url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/173/events","html_url":"https://github.com/stevengj/PyCall.jl/issues/173","id":97227339,"number":173,"title":"Building PyCall only works for one session in a virtualenv","user":{"login":"swt30","id":6207820,"avatar_url":"https://avatars.githubusercontent.com/u/6207820?v=3","gravatar_id":"","url":"https://api.github.com/users/swt30","html_url":"https://github.com/swt30","followers_url":"https://api.github.com/users/swt30/followers","following_url":"https://api.github.com/users/swt30/following{/other_user}","gists_url":"https://api.github.com/users/swt30/gists{/gist_id}","starred_url":"https://api.github.com/users/swt30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swt30/subscriptions","organizations_url":"https://api.github.com/users/swt30/orgs","repos_url":"https://api.github.com/users/swt30/repos","events_url":"https://api.github.com/users/swt30/events{/privacy}","received_events_url":"https://api.github.com/users/swt30/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-07-25T13:35:30Z","updated_at":"2015-07-29T14:59:51Z","closed_at":null,"body":"See https://github.com/stevengj/PyCall.jl/issues/167#issuecomment-124825724\r\n\r\ndeps.jl contains:\r\n\r\n```\r\nconst python = \"python\"\r\nconst libpython = \"libpython3.4m\"\r\nconst pyprogramname = wstring(\"/home/scott/.virtualenvs/py3/bin/python\")\r\nconst pyversion_build = v\"3.4.3\"\r\n\r\nconst PYTHONHOME = \"/home/scott/.virtualenvs/py3:/home/scott/.virtualenvs/py3\"\r\n\r\nconst PyUnicode_AsUTF8String = :PyUnicode_AsUTF8String\r\nconst PyUnicode_DecodeUTF8 = :PyUnicode_DecodeUTF8\r\n\r\nconst PyString_FromString = :PyBytes_FromString\r\nconst PyString_AsString = :PyBytes_AsString\r\nconst PyString_Size = :PyBytes_Size\r\nconst PyString_Type = :PyBytes_Type\r\nconst PyInt_Type = :PyLong_Type\r\nconst PyInt_FromSize_t = :PyLong_FromSize_t\r\nconst PyInt_FromSsize_t = :PyLong_FromSsize_t\r\nconst PyInt_AsSsize_t = :PyLong_AsSsize_t\r\n\r\nconst Py_hash_t = Int64\r\n\r\nconst pyunicode_literals = true\r\n```"},"comment":{"url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/comments/125980655","html_url":"https://github.com/stevengj/PyCall.jl/issues/173#issuecomment-125980655","issue_url":"https://api.github.com/repos/stevengj/PyCall.jl/issues/173","id":125980655,"user":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars.githubusercontent.com/u/2913679?v=3","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T14:59:51Z","updated_at":"2015-07-29T14:59:51Z","body":"That is so bizarre.  `Py_SetPythonHome` is supposed to be the preferred replacement for setting `PYTHONHOME` (which can screw up subprocesses), and the [source code of Python](https://github.com/python/cpython/blob/dafb2a203aae603257386fc6951c882a0d1e7ab8/Python/pylifecycle.c#L856-L878) (which hasn't changed much in this part since Python 2.7, except for the change from `char*` to `wchar_t*`) only reads 'PYTHONHOME' from `Py_GetPythonHome`, which always prefers the value set by `SetPythonHome`.   "}}