Skip to content
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

Using pip fails with IndexError: index out of range: -1 #71

Closed
slide opened this issue Jun 9, 2017 · 10 comments
Closed

Using pip fails with IndexError: index out of range: -1 #71

slide opened this issue Jun 9, 2017 · 10 comments

Comments

@slide
Copy link
Contributor

slide commented Jun 9, 2017

From @pekkaklarck on January 30, 2017 11:57

After installing IronPython 2.7.7 and running ipy -X:Frames -m ensurepip, trying to install a package or just check the installed pip version fails like this:

C:\Windows\system32>ipy -X:Frames -m pip install robotframework
Unhandled exception:
Traceback (most recent call last):
  File "c:\Program Files (x86)\IronPython 2.7\Lib\runpy.py", line 182, in run_module
  File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\_vendor\pyparsing.py", line 1261, in setParseAction
  File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\_vendor\pyparsing.py", line 1043, in _trim_arity
  File "c:\Program Files (x86)\IronPython 2.7\Lib\runpy.py", line 111, in _get_module_details
  File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\__init__.py", line 26, in <module>
  File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\utils\__init__.py", line 27, in <module>
  File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 74, in <module>
  File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\_vendor\packaging\requirements.py", line 9, in <module>
  File "c:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pip\_vendor\pyparsing.py", line 4715, in <module>
IndexError: index out of range: -1

Same problem if I just try to check installed pip version with --version or run the installed pip.exe directly.

Copied from original issue: IronLanguages/main#1572

@slide
Copy link
Contributor Author

slide commented Jun 9, 2017

From @slozier on February 6, 2017 13:1

I haven't been able to reproduce this using the steps provided (install IronPython 2.7.7, run ensure pip and then "try to do anything with pip").

After hitting the same issue while investigating #1573 I did boil it down to a simple repro case which does not invlove pyparsing: IronLanguages/main#1573 (comment)

@lostmsu
Copy link

lostmsu commented Aug 24, 2017

Heads up, I get the same after upgrading pip to 9.0.1 and trying to install Tensorflow.
@slide , your link is broken now.

@slide
Copy link
Contributor Author

slide commented Aug 24, 2017

Please don't upgrade pip, we test with a specific version of pip.

@lostmsu
Copy link

lostmsu commented Aug 24, 2017

@slide , pip <= 9.0 can't see Tensorflow.

@slide
Copy link
Contributor Author

slide commented Aug 24, 2017

Pip > what we bundle isn't guaranteed to work. Even the one we bundle still causes issues for some people.

@lostmsu
Copy link

lostmsu commented Aug 24, 2017

@slide , it's OK. If that becomes critical, I can debug myself.

@pekkaklarck
Copy link

Could you work with pip devs about getting pip tested on IronPython automatically? AFAIK they already test with PyPy, and adding IronPython (and Jython) into the mix shouldn't be overly complicated.

@slide
Copy link
Contributor Author

slide commented Dec 6, 2017

The -1 issue is because pyparsing is using the traceback and f_back to determine function names and things like that. The f_back property is not getting filled in for some reason. This needs to be debugged.

@pekkaklarck
Copy link

pip seems to work pretty fine with 2.7.8. Feel free to close this issue @slide.

@slide
Copy link
Contributor Author

slide commented May 15, 2018

Well, the newer versions of pip don't work with IronPython 2.7.8, we should create a new issue to track that.

@slide slide closed this as completed May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants