{"action":"opened","issue":{"url":"https://api.github.com/repos/rbanffy/pip-chill/issues/12","repository_url":"https://api.github.com/repos/rbanffy/pip-chill","labels_url":"https://api.github.com/repos/rbanffy/pip-chill/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/rbanffy/pip-chill/issues/12/comments","events_url":"https://api.github.com/repos/rbanffy/pip-chill/issues/12/events","html_url":"https://github.com/rbanffy/pip-chill/issues/12","id":299548390,"number":12,"title":"Relative import not working in Python3","user":{"login":"YPCrumble","id":12019216,"avatar_url":"https://avatars2.githubusercontent.com/u/12019216?v=4","gravatar_id":"","url":"https://api.github.com/users/YPCrumble","html_url":"https://github.com/YPCrumble","followers_url":"https://api.github.com/users/YPCrumble/followers","following_url":"https://api.github.com/users/YPCrumble/following{/other_user}","gists_url":"https://api.github.com/users/YPCrumble/gists{/gist_id}","starred_url":"https://api.github.com/users/YPCrumble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YPCrumble/subscriptions","organizations_url":"https://api.github.com/users/YPCrumble/orgs","repos_url":"https://api.github.com/users/YPCrumble/repos","events_url":"https://api.github.com/users/YPCrumble/events{/privacy}","received_events_url":"https://api.github.com/users/YPCrumble/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-22T23:35:54Z","updated_at":"2018-02-22T23:35:54Z","closed_at":null,"author_association":"NONE","body":"Thanks for this cool library!\r\n\r\n* PIP Chill version: 0.1.7\r\n* Python version: 3.6.2\r\n* Operating System: Mac OSX\r\n\r\n### Description\r\nTraceback:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/var/pyenv/versions/3.6.2/bin/pip-chill\", line 7, in <module>\r\n    from pip_chill.cli import main\r\n  File \"/usr/local/var/pyenv/versions/3.6.2/lib/python3.6/site-packages/pip_chill/__init__.py\", line 3, in <module>\r\n    from .pip_chill import chill\r\n  File \"/usr/local/var/pyenv/versions/3.6.2/lib/python3.6/site-packages/pip_chill/pip_chill.py\", line 7, in <module>\r\n    from utils import Distribution\r\nModuleNotFoundError: No module named 'utils'\r\n```\r\n\r\n### What I Did\r\n\r\nI get the above error when I install pip-chill and run it via the command line. I believe the issue is that I'm running Python 3 and the line `from utils import Distribution` is a relative import. I believe it should be `from .utils import Distribution`. \r\n\r\nI think the reason it's passing the test suite is that the `tox.ini` file overrides the `PYTHONPATH` via `setenv = PYTHONPATH = {toxinidir}:{toxinidir}/pip_chill`. This makes `utils.py` available as a module, but that isn't done when you install `pip-chill` via pip in Python3. I'm not aware of any reason to override the PYTHONPATH - please let me know if I'm missing something!\r\n\r\nI'll create a quick PR that I believe should fix the issue."}}
{"actor":{"display_login":"YPCrumble"}}