{"action":"created","issue":{"url":"https://api.github.com/repos/wagtail/wagtail/issues/4327","repository_url":"https://api.github.com/repos/wagtail/wagtail","labels_url":"https://api.github.com/repos/wagtail/wagtail/issues/4327/labels{/name}","comments_url":"https://api.github.com/repos/wagtail/wagtail/issues/4327/comments","events_url":"https://api.github.com/repos/wagtail/wagtail/issues/4327/events","html_url":"https://github.com/wagtail/wagtail/issues/4327","id":301454711,"number":4327,"title":"Add warning for pip2 users or possibly change documentation","user":{"login":"DougBeney","id":19509074,"avatar_url":"https://avatars1.githubusercontent.com/u/19509074?v=4","gravatar_id":"","url":"https://api.github.com/users/DougBeney","html_url":"https://github.com/DougBeney","followers_url":"https://api.github.com/users/DougBeney/followers","following_url":"https://api.github.com/users/DougBeney/following{/other_user}","gists_url":"https://api.github.com/users/DougBeney/gists{/gist_id}","starred_url":"https://api.github.com/users/DougBeney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DougBeney/subscriptions","organizations_url":"https://api.github.com/users/DougBeney/orgs","repos_url":"https://api.github.com/users/DougBeney/repos","events_url":"https://api.github.com/users/DougBeney/events{/privacy}","received_events_url":"https://api.github.com/users/DougBeney/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-01T15:48:12Z","updated_at":"2018-03-01T16:42:49Z","closed_at":null,"author_association":"NONE","body":"Congrats on version 2!\r\n\r\nSince you are completely on Python3 now, I believe [the documentation](https://wagtail.io/developers/) should either instruct the user to use `pip3` or show a warning when `pip2` is used instead.\r\n\r\nI'm not 100% sure if it's possible for you to show a warning for `pip2`, but I just thought I'd suggest it.\r\n\r\nFor some systems -- mostly Linux distributions -- the `pip` command defaults to using `pip2`.\r\n\r\nIt turns out my system, running on Solus Linux, defaults to pip2 instead of pip3. So, I unknowingly installed Wagtail using pip2. When I used the `wagtail start` command to create a site, it created this unobvious error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/wagtail\", line 11, in <module>\r\n    load_entry_point('wagtail==2.0', 'console_scripts', 'wagtail')()\r\n  File \"/usr/lib/python2.7/site-packages/pkg_resources/__init__.py\", line 572, in load_entry_point\r\n    return get_distribution(dist).load_entry_point(group, name)\r\n  File \"/usr/lib/python2.7/site-packages/pkg_resources/__init__.py\", line 2755, in load_entry_point\r\n    return ep.load()\r\n  File \"/usr/lib/python2.7/site-packages/pkg_resources/__init__.py\", line 2408, in load\r\n    return self.resolve()\r\n  File \"/usr/lib/python2.7/site-packages/pkg_resources/__init__.py\", line 2414, in resolve\r\n    module = __import__(self.module_name, fromlist=['__name__'], level=0)\r\n  File \"/usr/lib/python2.7/site-packages/wagtail/bin/wagtail.py\", line 230\r\n    print(line, end='')  # NOQA\r\n                   ^\r\nSyntaxError: invalid syntax\r\n```\r\n\r\nI fixed this issue by uninstalling wagtail and using `pip3 install wagtail` instead."},"comment":{"url":"https://api.github.com/repos/wagtail/wagtail/issues/comments/369653056","html_url":"https://github.com/wagtail/wagtail/issues/4327#issuecomment-369653056","issue_url":"https://api.github.com/repos/wagtail/wagtail/issues/4327","id":369653056,"user":{"login":"DougBeney","id":19509074,"avatar_url":"https://avatars1.githubusercontent.com/u/19509074?v=4","gravatar_id":"","url":"https://api.github.com/users/DougBeney","html_url":"https://github.com/DougBeney","followers_url":"https://api.github.com/users/DougBeney/followers","following_url":"https://api.github.com/users/DougBeney/following{/other_user}","gists_url":"https://api.github.com/users/DougBeney/gists{/gist_id}","starred_url":"https://api.github.com/users/DougBeney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DougBeney/subscriptions","organizations_url":"https://api.github.com/users/DougBeney/orgs","repos_url":"https://api.github.com/users/DougBeney/repos","events_url":"https://api.github.com/users/DougBeney/events{/privacy}","received_events_url":"https://api.github.com/users/DougBeney/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T16:42:49Z","updated_at":"2018-03-01T16:42:49Z","author_association":"NONE","body":"What are your thoughts about this solution, implementing a warning?\r\n\r\nFirst, you'd create a file called something like `versioncheck.py`:\r\n\r\n```\r\nimport sys\r\nif sys.version_info.major < 3:\r\n    sys.stdout.write(\"Wagtail requires Python 3 and also to be installed using pip3.\\n\")\r\n    sys.exit(1)\r\n```\r\n\r\nThen, you can simply import this `versioncheck.py` at the top of whichever file of yours is in charge of the wagtail command"}}
{"actor":{"display_login":"DougBeney"}}