[issue20019] platform.py line _sys_version function

M.-A. Lemburg mal at egenix.com
Thu Dec 19 01:13:59 CET 2013


On 19.12.2013 00:52, Wes wrote:
> 
> Marc,
> 
> Here was the initial output:
> 
>>>> platform.__file__
> '/Users/wesmadrigal/anaconda/lib/python2.7/platform.pyc'
>>>> import sys
>>>> sys.version
> '2.7.6 |Anaconda 1.8.0 (x86_64)| (default, Nov 11 2013, 10:49:09) \n[GCC
> 4.0.1 (Apple Inc. build 5493)]'

The part '|Anaconda 1.8.0 (x86_64)|' in that string is not standard
Python conform and as a result, the platform.py parser fails.

You'll have to open a ticket with the Anaconda vendor to get this
fixed.

> Here is what I had when I reverted back to the standard $PATH that comes
> stock in Mac OSX Mountain Lion on this new Macbook Pro:
> 
>>>> platform.__file__
> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.pyc'
>>>> import sys
>>>> sys.version
> '2.7.5 (default, Sep 12 2013, 21:33:34) \n[GCC 4.2.1 Compatible Apple LLVM
> 5.0 (clang-500.0.68)]'

This should parse correctly with the stock platform.py parser.

The only explanation I have is that the platform.py installed
on your machine is not the original one that comes with the
Python 2.7.5 we distribute from python.org.

I don't have a Mac OSX notebook available to check, so can't
really help.

-- 
Marc-Andre Lemburg
eGenix.com



More information about the Python-bugs-list mailing list