[issue20019] platform.py line _sys_version function
Marc-Andre Lemburg added the comment: Closing, since there's nothing much we can do about the problem. -- resolution: - invalid status: open - closed versions: +3rd party -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
Wes added the comment: I'll submit this to Continuum Analytics so they know it's their issue. On Thu, Dec 19, 2013 at 3:06 AM, Marc-Andre Lemburg rep...@bugs.python.orgwrote: Marc-Andre Lemburg added the comment: Closing, since there's nothing much we can do about the problem. -- resolution: - invalid status: open - closed versions: +3rd party -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
New submission from Wes: Marc-Andre, I'm on a Macbook pro OSX Mountain Lion I've been automating virtual environment builds locally and remotely, but it seems that when my pip install -r requirements.txt tries to run and download.py in pip/ runs it invokes platform.py. I'm getting a user-agent issue from the _sys_version function. Here is the error: File /Users/me/anaconda/lib/python2.7/platform.py, line 1500, in python_implementation return _sys_version()[0] File /Users/me/anaconda/lib/python2.7/platform.py, line 1464, in _sys_version repr(sys_version)) ValueError: failed to parse CPython 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)]' I've found the following stack that also references this error: http://stackoverflow.com/questions/19105255/praw-failed-to-parse-cpython-sys-version-when-creating-reddit-object -- components: 2to3 (2.x to 3.x conversion tool) messages: 206560 nosy: lemburg, wesmadrigal priority: normal severity: normal status: open title: platform.py line _sys_version function type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
Marc-Andre Lemburg added the comment: I have tried this with a stock Python 2.7.6 version and don't get an error: platform._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)]') ('CPython', '2.7.5', '', '', 'default', 'Sep 12 2013 21:33:34', 'GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)') The stackoverflow posting you mentioned obviously uses a Python version that was modified in incompatible ways, so it doesn't apply here. Are you running an Apple version of Python or one that was installed using the python.org installer ? -- components: +Library (Lib) -2to3 (2.x to 3.x conversion tool) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
Wes added the comment: Marc Thanks for getting back to me so quickly on this. I'm running an apple version of python from the looks of it. I was running an Anaconda version at the time I posted this script, but I just reset my $PATH variable to use the mac factory python and still got the error. Python 2.7.5 (default, Sep 12 2013, 21:33:34) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type help, copyright, credits or license for more information. On Wed, Dec 18, 2013 at 5:17 PM, Marc-Andre Lemburg rep...@bugs.python.orgwrote: Marc-Andre Lemburg added the comment: I have tried this with a stock Python 2.7.6 version and don't get an error: platform._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)]') ('CPython', '2.7.5', '', '', 'default', 'Sep 12 2013 21:33:34', 'GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)') The stackoverflow posting you mentioned obviously uses a Python version that was modified in incompatible ways, so it doesn't apply here. Are you running an Apple version of Python or one that was installed using the python.org installer ? -- components: +Library (Lib) -2to3 (2.x to 3.x conversion tool) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
Marc-Andre Lemburg added the comment: On 19.12.2013 00:39, Wes wrote: Marc Thanks for getting back to me so quickly on this. I'm running an apple version of python from the looks of it. I was running an Anaconda version at the time I posted this script, but I just reset my $PATH variable to use the mac factory python and still got the error. Python 2.7.5 (default, Sep 12 2013, 21:33:34) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type help, copyright, credits or license for more information. That looks pretty much the same. I suspect that either Apple changed something in their Python version or that pip is picking up a non-standard platform.py from somewhere. Could you check platform.__file__ and sys.version ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
Wes added the comment: 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)]' 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)]' On Wed, Dec 18, 2013 at 5:46 PM, Marc-Andre Lemburg rep...@bugs.python.orgwrote: Marc-Andre Lemburg added the comment: On 19.12.2013 00:39, Wes wrote: Marc Thanks for getting back to me so quickly on this. I'm running an apple version of python from the looks of it. I was running an Anaconda version at the time I posted this script, but I just reset my $PATH variable to use the mac factory python and still got the error. Python 2.7.5 (default, Sep 12 2013, 21:33:34) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type help, copyright, credits or license for more information. That looks pretty much the same. I suspect that either Apple changed something in their Python version or that pip is picking up a non-standard platform.py from somewhere. Could you check platform.__file__ and sys.version ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
Ned Deily added the comment: The version string does not match either the Apple-supplied Python in 10.8 (Mountain Lion) nor that of a python.org Python. The anaconda directory name suggests this is probably a Python from the Anaconda Scientific distribution. There have been other issues with _sys_version as reported on their bug tracker; see https://github.com/ContinuumIO/anaconda-issues/search?q=_sys_versiontype=Issues -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
Wes added the comment: I just commented out the _sys_version_parser regular expression in anaconda/lib/python2.7/platform.py on line 1363 and replaced it with the _sys_version_parser from /usr/lib/python2.7/platform.py and everything worked fine. On Wed, Dec 18, 2013 at 5:53 PM, Ned Deily rep...@bugs.python.org wrote: Ned Deily added the comment: The version string does not match either the Apple-supplied Python in 10.8 (Mountain Lion) nor that of a python.org Python. The anaconda directory name suggests this is probably a Python from the Anaconda Scientific distribution. There have been other issues with _sys_version as reported on their bug tracker; see https://github.com/ContinuumIO/anaconda-issues/search?q=_sys_versiontype=Issues -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
Wes added the comment: The shitty part is, you pretty much need anaconda to run iPython notebook on a mac. On Wed, Dec 18, 2013 at 6:08 PM, Wes Madrigal wesley7...@gmail.com wrote: I just commented out the _sys_version_parser regular expression in anaconda/lib/python2.7/platform.py on line 1363 and replaced it with the _sys_version_parser from /usr/lib/python2.7/platform.py and everything worked fine. On Wed, Dec 18, 2013 at 5:53 PM, Ned Deily rep...@bugs.python.org wrote: Ned Deily added the comment: The version string does not match either the Apple-supplied Python in 10.8 (Mountain Lion) nor that of a python.org Python. The anaconda directory name suggests this is probably a Python from the Anaconda Scientific distribution. There have been other issues with _sys_version as reported on their bug tracker; see https://github.com/ContinuumIO/anaconda-issues/search?q=_sys_versiontype=Issues -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
Marc-Andre Lemburg added the comment: 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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20019] platform.py line _sys_version function
Wes added the comment: Marc, Thanks for your help. What I did was just copied the _sys_version_parser from the standard python platform.py into the anaconda version of platform.py and it fixed the issue. So it looks like Anaconda made a change to your regular expression. Thanks for getting on the issue so quick and staying with it, though. On Wed, Dec 18, 2013 at 6:14 PM, Marc-Andre Lemburg rep...@bugs.python.orgwrote: Marc-Andre Lemburg added the comment: 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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com