{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/setuptools/issues/1433","repository_url":"https://api.github.com/repos/pypa/setuptools","labels_url":"https://api.github.com/repos/pypa/setuptools/issues/1433/labels{/name}","comments_url":"https://api.github.com/repos/pypa/setuptools/issues/1433/comments","events_url":"https://api.github.com/repos/pypa/setuptools/issues/1433/events","html_url":"https://github.com/pypa/setuptools/issues/1433","id":343362707,"node_id":"MDU6SXNzdWUzNDMzNjI3MDc=","number":1433,"title":"Setup of 40.0 via pip on MacOS High Sierra is not successful","user":{"login":"adam-ah","id":3745745,"node_id":"MDQ6VXNlcjM3NDU3NDU=","avatar_url":"https://avatars3.githubusercontent.com/u/3745745?v=4","gravatar_id":"","url":"https://api.github.com/users/adam-ah","html_url":"https://github.com/adam-ah","followers_url":"https://api.github.com/users/adam-ah/followers","following_url":"https://api.github.com/users/adam-ah/following{/other_user}","gists_url":"https://api.github.com/users/adam-ah/gists{/gist_id}","starred_url":"https://api.github.com/users/adam-ah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam-ah/subscriptions","organizations_url":"https://api.github.com/users/adam-ah/orgs","repos_url":"https://api.github.com/users/adam-ah/repos","events_url":"https://api.github.com/users/adam-ah/events{/privacy}","received_events_url":"https://api.github.com/users/adam-ah/received_events","type":"User","site_admin":false},"labels":[{"id":1097196749,"node_id":"MDU6TGFiZWwxMDk3MTk2NzQ5","url":"https://api.github.com/repos/pypa/setuptools/labels/Needs%20Triage","name":"Needs Triage","color":"dd3333","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-21T23:18:05Z","updated_at":"2018-10-22T15:58:01Z","closed_at":null,"author_association":"NONE","body":"I'm trying to install using pip but Mac OS X, 10.13.4 is already shipped with an old version\r\n```\r\npip --version\r\npip 10.0.1 from /Library/Python/2.7/site-packages/pip (python 2.7)\r\n```\r\n\r\n```\r\nMacBook-Pro:KerasDemo user$ sudo pip install setuptools --upgrade\r\nPassword:\r\nThe directory '/Users/user/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.\r\nThe directory '/Users/user/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.\r\nCollecting setuptools\r\n  Downloading https://files.pythonhosted.org/packages/ff/f4/385715ccc461885f3cedf57a41ae3c12b5fec3f35cce4c8706b1a112a133/setuptools-40.0.0-py2.py3-none-any.whl (567kB)\r\n    100% |████████████████████████████████| 573kB 3.0MB/s \r\nInstalling collected packages: setuptools\r\n  Found existing installation: setuptools 18.5\r\n    Uninstalling setuptools-18.5:\r\nCould not install packages due to an EnvironmentError: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/private/tmp/pip-uninstall-2PS_oP/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', \"[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-2PS_oP/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'\"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/private/tmp/pip-uninstall-2PS_oP/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', \"[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-2PS_oP/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py'\"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/private/tmp/pip-uninstall-2PS_oP/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', \"[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-2PS_oP/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'\"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/private/tmp/pip-uninstall-2PS_oP/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', \"[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-2PS_oP/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc'\"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/private/tmp/pip-uninstall-2PS_oP/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', \"[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-2PS_oP/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'\")]\r\n```\r\n\r\nOK, let's try a user install:\r\n\r\n```\r\nMacBook-Pro:KerasDemo user$ sudo pip install setuptools --upgrade --user\r\nThe directory '/Users/user/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.\r\nThe directory '/Users/user/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.\r\nCollecting setuptools\r\n  Downloading https://files.pythonhosted.org/packages/ff/f4/385715ccc461885f3cedf57a41ae3c12b5fec3f35cce4c8706b1a112a133/setuptools-40.0.0-py2.py3-none-any.whl (567kB)\r\n    100% |████████████████████████████████| 573kB 3.4MB/s \r\nInstalling collected packages: setuptools\r\nSuccessfully installed setuptools-40.0.0\r\n```\r\n\r\nBut then:\r\n\r\n```\r\nMacBook-Pro:KerasDemo user$ which easy_install\r\n/Users/user/Library/Python/2.7/bin/easy_install\r\nMacBook-Pro:KerasDemo user$ easy_install\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/easy_install-2.7\", line 11, in <module>\r\n    load_entry_point('setuptools==18.5', 'console_scripts', 'easy_install')()\r\n  File \"/Users/user/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py\", line 479, in load_entry_point\r\n    return get_distribution(dist).load_entry_point(group, name)\r\n  File \"/Users/user/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py\", line 2703, in load_entry_point\r\n    return ep.load()\r\n  File \"/Users/user/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py\", line 2321, in load\r\n    return self.resolve()\r\n  File \"/Users/user/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py\", line 2327, in resolve\r\n    module = __import__(self.module_name, fromlist=['__name__'], level=0)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py\", line 46, in <module>\r\n    from setuptools.archive_util import unpack_archive\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/archive_util.py\", line 15, in <module>\r\n    from pkg_resources import ensure_directory, ContextualZipFile\r\nImportError: cannot import name ContextualZipFile\r\n```\r\n\r\nOr maybe just try to ignore and install it anyway:\r\n\r\n```\r\nMacBook-Pro:KerasDemo user$ sudo pip install setuptools --ignore-installed\r\nThe directory '/Users/user/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.\r\nThe directory '/Users/user/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.\r\nCollecting setuptools\r\n  Downloading https://files.pythonhosted.org/packages/ff/f4/385715ccc461885f3cedf57a41ae3c12b5fec3f35cce4c8706b1a112a133/setuptools-40.0.0-py2.py3-none-any.whl (567kB)\r\n    100% |████████████████████████████████| 573kB 3.1MB/s \r\nInstalling collected packages: setuptools\r\nCould not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/usr/local/bin/easy_install'\r\n```\r\n\r\nThe bottom line is that I can't seem to install setuptools 40.0 so it has a valid and working binary in /usr/local/bin/easy_install\r\n\r\nAny help would be appreciated."},"comment":{"url":"https://api.github.com/repos/pypa/setuptools/issues/comments/431877938","html_url":"https://github.com/pypa/setuptools/issues/1433#issuecomment-431877938","issue_url":"https://api.github.com/repos/pypa/setuptools/issues/1433","id":431877938,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTg3NzkzOA==","user":{"login":"pganssle","id":1377457,"node_id":"MDQ6VXNlcjEzNzc0NTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1377457?v=4","gravatar_id":"","url":"https://api.github.com/users/pganssle","html_url":"https://github.com/pganssle","followers_url":"https://api.github.com/users/pganssle/followers","following_url":"https://api.github.com/users/pganssle/following{/other_user}","gists_url":"https://api.github.com/users/pganssle/gists{/gist_id}","starred_url":"https://api.github.com/users/pganssle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pganssle/subscriptions","organizations_url":"https://api.github.com/users/pganssle/orgs","repos_url":"https://api.github.com/users/pganssle/repos","events_url":"https://api.github.com/users/pganssle/events{/privacy}","received_events_url":"https://api.github.com/users/pganssle/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T15:58:01Z","updated_at":"2018-10-22T15:58:01Z","author_association":"MEMBER","body":"@adam-ah Did you ever get this resolved? I suspect that this is an issue with your specific setup, because I haven't seen other HS users having trouble installing setuptools.\r\n\r\nI don't have access to a mac laptop, but I suspect that anything involving `sudo pip install` is a bad idea. My understanding is that the system-shipped version of Python is in a bit of a sorry state and you're best off never using system python and instead using [homebrew's python](https://docs.brew.sh/Homebrew-and-Python) and/or [pyenv](https://github.com/pyenv/pyenv). I suspect that if you do that it will fix your permissions issues."}}
{"actor":{"display_login":"pganssle"}}