{"action":"opened","issue":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1699","labels_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1699/labels{/name}","comments_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1699/comments","events_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1699/events","html_url":"https://github.com/pyinstaller/pyinstaller/issues/1699","id":119754656,"number":1699,"title":"Wrapping pip 7.1.2 fails","user":{"login":"virtuald","id":567900,"avatar_url":"https://avatars.githubusercontent.com/u/567900?v=3","gravatar_id":"","url":"https://api.github.com/users/virtuald","html_url":"https://github.com/virtuald","followers_url":"https://api.github.com/users/virtuald/followers","following_url":"https://api.github.com/users/virtuald/following{/other_user}","gists_url":"https://api.github.com/users/virtuald/gists{/gist_id}","starred_url":"https://api.github.com/users/virtuald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtuald/subscriptions","organizations_url":"https://api.github.com/users/virtuald/orgs","repos_url":"https://api.github.com/users/virtuald/repos","events_url":"https://api.github.com/users/virtuald/events{/privacy}","received_events_url":"https://api.github.com/users/virtuald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-01T16:28:31Z","updated_at":"2015-12-01T16:28:31Z","closed_at":null,"body":"Can be demonstrated very easily on linux via:\r\n\r\n    pyinstaller --clean -F `which pip`\r\n\r\nAnd that generates the following stack trace:\r\n\r\n```\r\nroot@87ba95481f9c:~# dist/pip \r\nTraceback (most recent call last):\r\n  File \"<string>\", line 7, in <module>\r\n  File \"/tmp/pip-build-2K5lpH/pyinstaller/PyInstaller/loader/pyimod03_importers.py\", line 364, in load_module\r\n  File \"/usr/local/lib/python2.7/dist-packages/pip/__init__.py\", line 13, in <module>\r\n    from pip.utils import get_installed_distributions, get_prog\r\n  File \"/tmp/pip-build-2K5lpH/pyinstaller/PyInstaller/loader/pyimod03_importers.py\", line 364, in load_module\r\n  File \"/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py\", line 19, in <module>\r\n    from pip.locations import (\r\n  File \"/tmp/pip-build-2K5lpH/pyinstaller/PyInstaller/loader/pyimod03_importers.py\", line 364, in load_module\r\n  File \"/usr/local/lib/python2.7/dist-packages/pip/locations.py\", line 144, in <module>\r\n    bin_user = os.path.join(user_site, 'bin')\r\n  File \"/usr/lib/python2.7/posixpath.py\", line 77, in join\r\n    elif path == '' or path.endswith('/'):\r\nAttributeError: 'NoneType' object has no attribute 'endswith'\r\npip returned -1\r\n```\r\n\r\nIt looks like what's happening is the site.USER_SITE value is None, and pip expects it to be a string.\r\n\r\nOf course, one might ask why would you want to wrap pip? Well, we're using the pip api from our application, and it fails in the same way because of this bug.\r\n\r\nI suspect this is really a bug in pip, and I'll file the bug over there also. But, hard to say."}}