{"action":"created","issue":{"url":"https://api.github.com/repos/yyuu/pyenv/issues/484","labels_url":"https://api.github.com/repos/yyuu/pyenv/issues/484/labels{/name}","comments_url":"https://api.github.com/repos/yyuu/pyenv/issues/484/comments","events_url":"https://api.github.com/repos/yyuu/pyenv/issues/484/events","html_url":"https://github.com/yyuu/pyenv/issues/484","id":117677666,"number":484,"title":"Python 2.7.X \"No module named _struct\"","user":{"login":"mattrohland","id":368682,"avatar_url":"https://avatars.githubusercontent.com/u/368682?v=3","gravatar_id":"","url":"https://api.github.com/users/mattrohland","html_url":"https://github.com/mattrohland","followers_url":"https://api.github.com/users/mattrohland/followers","following_url":"https://api.github.com/users/mattrohland/following{/other_user}","gists_url":"https://api.github.com/users/mattrohland/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrohland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrohland/subscriptions","organizations_url":"https://api.github.com/users/mattrohland/orgs","repos_url":"https://api.github.com/users/mattrohland/repos","events_url":"https://api.github.com/users/mattrohland/events{/privacy}","received_events_url":"https://api.github.com/users/mattrohland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-18T20:45:36Z","updated_at":"2015-11-19T04:43:35Z","closed_at":null,"body":"I have had a lot of luck with pyenv in the past but after upgrading to Mac OS X 10.11.1 I am now seeing an \"ImportError: No module named _struct\" error when attempting to install older versions of python 2.7:\r\n\r\n```\r\npyenv install 2.7.3        \r\nDownloading Python-2.7.3.tgz...\r\n-> https://yyuu.github.io/pythons/d4c20f2b5faf95999fd5fecb3f7d32071b0820516224a6d2b72932ab47a1cb8e\r\nInstalling Python-2.7.3...\r\npatching file ./Modules/readline.c\r\nHunk #1 succeeded at 200 (offset -6 lines).\r\nHunk #2 succeeded at 735 (offset -14 lines).\r\nHunk #3 succeeded at 845 (offset -14 lines).\r\nHunk #4 succeeded at 893 with fuzz 2 (offset -25 lines).\r\npatching file ./Lib/site.py\r\n\r\nBUILD FAILED (OS X 10.11.1 using python-build 20151105-4-g9ca7de5)\r\n\r\nInspect or clean up the working tree at /var/folders/7n/4x7hyjv95191sb95wx24qm_wymlmy3/T/python-build.20151118152734.50204\r\nResults logged to /var/folders/7n/4x7hyjv95191sb95wx24qm_wymlmy3/T/python-build.20151118152734.50204.log\r\n\r\nLast 10 log lines:\r\n\t\t-d /Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7 -f \\\r\n\t\t-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \\\r\n\t\t/Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7\r\nTraceback (most recent call last):\r\n  File \"/Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/compileall.py\", line 16, in <module>\r\n    import struct\r\n  File \"/Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/struct.py\", line 1, in <module>\r\n    from _struct import *\r\nImportError: No module named _struct\r\nmake: *** [libinstall] Error 1\r\n```\r\n\r\nI had run through all the items in https://github.com/yyuu/pyenv/wiki/Common-build-problems and searched both the issues already reported here and StackOverflow, but have not seen this particular issue reported.\r\n\r\nHas this issue been reported?\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28372204-python-2-7-x-no-module-named-_struct?utm_campaign=plugin&utm_content=tracker%2F282009&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282009&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/yyuu/pyenv/issues/comments/157949348","html_url":"https://github.com/yyuu/pyenv/issues/484#issuecomment-157949348","issue_url":"https://api.github.com/repos/yyuu/pyenv/issues/484","id":157949348,"user":{"login":"mattrohland","id":368682,"avatar_url":"https://avatars.githubusercontent.com/u/368682?v=3","gravatar_id":"","url":"https://api.github.com/users/mattrohland","html_url":"https://github.com/mattrohland","followers_url":"https://api.github.com/users/mattrohland/followers","following_url":"https://api.github.com/users/mattrohland/following{/other_user}","gists_url":"https://api.github.com/users/mattrohland/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrohland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrohland/subscriptions","organizations_url":"https://api.github.com/users/mattrohland/orgs","repos_url":"https://api.github.com/users/mattrohland/repos","events_url":"https://api.github.com/users/mattrohland/events{/privacy}","received_events_url":"https://api.github.com/users/mattrohland/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T04:43:35Z","updated_at":"2015-11-19T04:43:35Z","body":"I had stumbled upon that bug in my searches too, but at a glance it didn't seem related.\r\n\r\nIf 2.7.3 isn't giving others on OS X 10.11.1 any trouble, it might be something very specific surrounding my environment. I'll keep hunting and attempt to remove anything else I may have customized in my development environment.\r\n\r\nAlso, I ran the test in verbose mode so there would be more context as to where in the process the error occurred. Not sure how insightful it is:\r\n\r\n```\r\n...\r\n/usr/bin/install -c -m 644 ./Lib/plat-mac/lib-scriptpackages/Terminal/Terminal_Suite.py /Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/plat-mac/lib-scriptpackages/Terminal\r\n/usr/bin/install -c -m 644 ./Lib/plat-mac/lib-scriptpackages/Terminal/Text_Suite.py /Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/plat-mac/lib-scriptpackages/Terminal\r\n/usr/bin/install -c -m 644 ./Lib/plat-mac/lib-scriptpackages/Terminal/__init__.py /Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/plat-mac/lib-scriptpackages/Terminal\r\n/usr/bin/install -c -m 644 ./LICENSE /Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/LICENSE.txt\r\nif test -d /Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/distutils/tests; then \\\r\n\t\t/usr/bin/install -c -m 644 ./Modules/xxmodule.c \\\r\n\t\t\t/Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/distutils/tests ; \\\r\n\tfi\r\nPYTHONPATH=/Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7   \\\r\n\t\t./python.exe -Wi -tt /Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/compileall.py \\\r\n\t\t-d /Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7 -f \\\r\n\t\t-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \\\r\n\t\t/Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7\r\nTraceback (most recent call last):\r\n  File \"/Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/compileall.py\", line 16, in <module>\r\n    import struct\r\n  File \"/Users/mrohland/.pyenv/versions/2.7.3/lib/python2.7/struct.py\", line 1, in <module>\r\n    from _struct import *\r\nImportError: No module named _struct\r\nmake: *** [libinstall] Error 1\r\n```"}}