Closed GoogleCodeExporter closed 8 years ago
Results in same error when using sudo as well.
Original comment by brads...@gmail.com
on 16 Jan 2014 at 11:08
If you install ActiveState python and change system path ordering to override
Apple's built-in python, then installation is clean and successful. But
installation was easy, clean, and successful prior to the 01-15-14 update,
without having to install another python interpreter...
Original comment by brads...@gmail.com
on 16 Jan 2014 at 5:28
This is a strange error to be getting from tarfile which is a standard module.
Can we get some more information about your Python environment (the standard
OSX Python, not the ActiveState one)? Please run the following in a Python
shell and send the output:
import sys
import tarfile
print sys.version
print sys.path
print tarfile.__file__
print tarfile.__version__
Original comment by markp...@google.com
on 16 Jan 2014 at 6:26
$ which python
/usr/bin/python
$ /usr/bin/python
Python 2.7.1 (r271:86832, Aug 5 2011, 03:30:24)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import tarfile
>>>
>>> print sys.version
2.7.1 (r271:86832, Aug 5 2011, 03:30:24)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]
>>> print sys.path
['',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-dar
win',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old'
,
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynl
oad',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyOb
jC', '/Library/Python/2.7/site-packages']
>>> print tarfile.__file__
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.p
yc
>>> print tarfile.__version__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '__version__'
>>>
Original comment by brads...@gmail.com
on 16 Jan 2014 at 7:20
The fact that it does not have a version is concerning. Can you attach the
entire file:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.p
y
this bug so we can have a look?
Original comment by markp...@google.com
on 16 Jan 2014 at 7:56
Only tarfile.pyc and tarfile.pyo versions are present, no .py...
Original comment by brads...@gmail.com
on 16 Jan 2014 at 8:03
Attachments:
The lack of a .py file is a problem because it means Python has no choice but
to look at the binary .pyc. Your tarfile.pyc is invalid (look at how small it
is compared to the .pyo). If you import it in Python and do a dir() it has no
methods or classes at all.
Not sure how this used to work you (maybe you were using a different version of
python or maybe it got corrupted at some point in the middle?). Best bet is to
use your new Python runtime, or try to repair this one.
Original comment by markp...@google.com
on 16 Jan 2014 at 9:26
I may have inadvertently corrupted tarfile.pyc in an attempt to resolve the
issue. At one point yesterday, I touched tarfile.py, creating an empty file.
It may have generated a tarfile.pyc from that empty file.
Apple apparently does not ship .py's, there's not a single .py file present in
the directory.
There was no problem whatsoever with my google cloud sdk prior to 01-15-14. I
installed cleanly on 01-10-14, with just stock Apple python.
I was tired of being nagged by "upgrade" sdk messages yesterday, so I complied
and updated. The update didn't work, period. Nor did a clean install.
Original comment by brads...@gmail.com
on 16 Jan 2014 at 9:51
Original issue reported on code.google.com by
brads...@gmail.com
on 16 Jan 2014 at 4:32