New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
platform.py line _sys_version function #64218
Comments
Marc-Andre, 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 File "/Users/me/anaconda/lib/python2.7/platform.py", line 1464, in _sys_version I've found the following stack that also references this error: |
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 ? |
Marc Thanks for getting back to me so quickly on this. I'm running an apple Python 2.7.5 (default, Sep 12 2013, 21:33:34) On Wed, Dec 18, 2013 at 5:17 PM, Marc-Andre Lemburg
|
On 19.12.2013 00:39, Wes wrote:
That looks pretty much the same. I suspect that either Apple changed something in their Python Could you check platform.__file__ and sys.version ? |
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 >>> 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
|
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_version&type=Issues |
I just commented out the _sys_version_parser regular expression in On Wed, Dec 18, 2013 at 5:53 PM, Ned Deily <report@bugs.python.org> wrote:
|
The shitty part is, you pretty much need anaconda to run iPython notebook On Wed, Dec 18, 2013 at 6:08 PM, Wes Madrigal <wesley7879@gmail.com> wrote:
|
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 You'll have to open a ticket with the Anaconda vendor to get this
This should parse correctly with the stock platform.py parser. The only explanation I have is that the platform.py installed I don't have a Mac OSX notebook available to check, so can't |
Marc, Thanks for your help. What I did was just copied the _sys_version_parser from the standard python 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
|
Closing, since there's nothing much we can do about the problem. |
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
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: