在Windows 10上安装IronPython 2.7.8(最新的稳定版本)后,我尝试运行pip,但出现如下错误:
PS C:\Program Files\IronPython 2.7> ipy.exe -m pip install numpy
Unhandled exception:
Traceback (most recent call last):
File "C:\Program Files\IronPython 2.7\Lib\runpy.py", line 187, in run_module
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_vendor\pyparsing.py", line 1261, in setParseAction
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_vendor\pyparsing.py", line 1043, in _trim_arity
File "C:\Program Files\IronPython 2.7\Lib\runpy.py", line 81, in _run_module_code
File "C:\Program Files\IronPython 2.7\Lib\runpy.py", line 72, in _run_code
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\__main__.py", line 16, in <module>
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_internal\__init__.py", line 42, in <module>
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_internal\cmdoptions.py", line 16, in <module>
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_internal\index.py", line 25, in <module>
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_internal\download.py", line 40, in <module>
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_internal\utils\logging.py", line 9, in <module>
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_internal\utils\misc.py", line 21, in <module>
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 77, in <module>
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_vendor\packaging\requirements.py", line 9, in <module>
File "C:\Program Files\IronPython 2.7\Lib\site-packages\pip\_vendor\pyparsing.py", line 4734, in <module>
IndexError: index out of range: -1
PS C:\Program Files\IronPython 2.7>
我不知道如何解决此错误。似乎是IronPython的问题?我无法将软件包安装到IronPython,因此无法进行任何开发。有人可以帮忙吗?
答案 0 :(得分:1)
https://github.com/IronLanguages/ironpython2/issues/71 我发现这个问题在github中得到了跟踪。 您必须确保使用的是适用于ipy 2.7.8的pip版本正确