{"action":"created","issue":{"url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/488","labels_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/488/labels{/name}","comments_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/488/comments","events_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/488/events","html_url":"https://github.com/jorgenschaefer/elpy/issues/488","id":57096085,"number":488,"title":"Elpy does not recognize properly the python version when using pyenv externally","user":{"login":"jrbalderrama","id":166918,"avatar_url":"https://avatars.githubusercontent.com/u/166918?v=3","gravatar_id":"","url":"https://api.github.com/users/jrbalderrama","html_url":"https://github.com/jrbalderrama","followers_url":"https://api.github.com/users/jrbalderrama/followers","following_url":"https://api.github.com/users/jrbalderrama/following{/other_user}","gists_url":"https://api.github.com/users/jrbalderrama/gists{/gist_id}","starred_url":"https://api.github.com/users/jrbalderrama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrbalderrama/subscriptions","organizations_url":"https://api.github.com/users/jrbalderrama/orgs","repos_url":"https://api.github.com/users/jrbalderrama/repos","events_url":"https://api.github.com/users/jrbalderrama/events{/privacy}","received_events_url":"https://api.github.com/users/jrbalderrama/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jorgenschaefer/elpy/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jorgenschaefer/elpy/milestones/14","labels_url":"https://api.github.com/repos/jorgenschaefer/elpy/milestones/14/labels","id":928225,"number":14,"title":"v1.8","description":"","creator":{"login":"jorgenschaefer","id":2500270,"avatar_url":"https://avatars.githubusercontent.com/u/2500270?v=3","gravatar_id":"","url":"https://api.github.com/users/jorgenschaefer","html_url":"https://github.com/jorgenschaefer","followers_url":"https://api.github.com/users/jorgenschaefer/followers","following_url":"https://api.github.com/users/jorgenschaefer/following{/other_user}","gists_url":"https://api.github.com/users/jorgenschaefer/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgenschaefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgenschaefer/subscriptions","organizations_url":"https://api.github.com/users/jorgenschaefer/orgs","repos_url":"https://api.github.com/users/jorgenschaefer/repos","events_url":"https://api.github.com/users/jorgenschaefer/events{/privacy}","received_events_url":"https://api.github.com/users/jorgenschaefer/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":10,"state":"open","created_at":"2015-01-09T08:02:23Z","updated_at":"2015-02-10T06:35:16Z","due_on":"2015-04-30T22:00:00Z","closed_at":null},"comments":4,"created_at":"2015-02-09T21:56:23Z","updated_at":"2015-02-10T09:43:32Z","closed_at":null,"body":"I'm using pyenv with local environment version 3.4.2 however the RPC Python shows the global one declared as 2.7.9. Following this misconfiguration other errors are raised, for example, during auto-completion, this error appears with jedi or rope:\r\n\r\n```\r\nError Message\r\n\r\ninvalid syntax (<unknown>, line 74)\r\n\r\nConfiguration\r\n\r\nVirtualenv........:  (/Users/xxx/workspace/python-radio/radio/)\r\nRPC Python........: 2.7.9 (/Users/xxx/.pyenv/shims/python)\r\nInteractive Python: python (/Users/xxx/.pyenv/shims/python)\r\nEmacs.............: 24.4.1\r\nElpy..............: 1.7.0\r\nJedi..............: 0.8.1\r\nRope..............: 0.10.2\r\nImportmagic.......: 0.1.2\r\nSyntax checker....: flake8 (/Users/xxx/.pyenv/shims/flake8)\r\n\r\nTraceback\r\n\r\nTraceback (most recent call last):\r\n  File \"/Users/xxx/.emacs.d/elpa/elpy-20150206.1012/elpy/rpc.py\", line 100, in handle_request\r\n    result = method(*params)\r\n  File \"/Users/xxx/.emacs.d/elpa/elpy-20150206.1012/elpy/server.py\", line 227, in rpc_get_unresolved_symbols\r\n    return self.import_magic.get_unresolved_symbols(source)\r\n  File \"/Users/xxx/.emacs.d/elpa/elpy-20150206.1012/elpy/impmagic.py\", line 63, in get_unresolved_symbols\r\n    scope = importmagic.symbols.Scope.from_source(source)\r\n  File \"/Users/xxx/.pyenv/versions/2.7.9/lib/python2.7/site-packages/importmagic/symbols.py\", line 87, in from_source\r\n    src = parse_ast(src)\r\n  File \"/Users/xxx/.pyenv/versions/2.7.9/lib/python2.7/site-packages/importmagic/util.py\", line 18, in parse_ast\r\n    return ast.parse(source, filename or '<unknown>')\r\n  File \"/Users/xxx/.pyenv/versions/2.7.9/lib/python2.7/ast.py\", line 37, in parse\r\n    return compile(source, filename, mode, PyCF_ONLY_AST)\r\n  File \"<unknown>\", line 74\r\n    print(\"\\tNo references for '{}'\\n\".format(name), file=sys.stderr)\r\n                                                         ^\r\nSyntaxError: invalid syntax\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/comments/73670959","html_url":"https://github.com/jorgenschaefer/elpy/issues/488#issuecomment-73670959","issue_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/488","id":73670959,"user":{"login":"jrbalderrama","id":166918,"avatar_url":"https://avatars.githubusercontent.com/u/166918?v=3","gravatar_id":"","url":"https://api.github.com/users/jrbalderrama","html_url":"https://github.com/jrbalderrama","followers_url":"https://api.github.com/users/jrbalderrama/followers","following_url":"https://api.github.com/users/jrbalderrama/following{/other_user}","gists_url":"https://api.github.com/users/jrbalderrama/gists{/gist_id}","starred_url":"https://api.github.com/users/jrbalderrama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrbalderrama/subscriptions","organizations_url":"https://api.github.com/users/jrbalderrama/orgs","repos_url":"https://api.github.com/users/jrbalderrama/repos","events_url":"https://api.github.com/users/jrbalderrama/events{/privacy}","received_events_url":"https://api.github.com/users/jrbalderrama/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T09:43:32Z","updated_at":"2015-02-10T09:43:32Z","body":"```\r\n(\"/Users/xxx/.pyenv/shims/python\" . \"/Users/xxx/workspace/python-radio/radio//bin:/Users/xxx/.pyenv/shims/:/Users/xxx/.rvm/gems/ruby-2.1.5/bin/:/Users/xxx/.rvm/gems/ruby-2.1.5@global/bin/:/Users/xxx/.rvm/rubies/ruby-2.1.5/bin/:/usr/local/bin/:/usr/local/sbin/:/Users/xxx/bin/:/usr/bin/:/bin/:/usr/sbin/:/sbin/:/usr/local/bin/:/opt/X11/bin/:/usr/local/MacGPG2/bin/:/usr/texbin/:/Users/xxx/.rvm/bin/:/usr/local/Cellar/emacs/24.4/libexec/emacs/24.4/x86_64-apple-darwin13.4.0/\")\r\n```\r\n\r\nBTW this is the message when I get the compiler shell inside Emacs:\r\n\r\n```\r\nPython 3.4.2 (default, Feb  3 2015, 17:19:15) \r\n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>>\r\n```"}}