是否可以通过命令行在IronPython上安装和使用pip? (我不是通过PTVS这样做的。)
我已经尝试过的事情:
查看了此答案on Yahoo,但distribute_setup.py
的链接已损坏。我从这里得到了一份副本:distribute_setup.py,它终止于此:
IOError: System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
看一下pip docs,但这显然适用于CPython,而不是IronPython。
按照Steps to installing setuptools on IronPython上的步骤操作。根据评论,它在去年8月有效,但我得到了与上述相同的错误:
IOError: System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
查看这些错误的完整输出。它似乎拿起了鸡蛋,但在调用urllib2.urlopen(url)
期间的过程中失败了:
Downloading http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
Traceback (most recent call last):
File "ez_setup.py", line 158, in download_setuptools
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 126, in urlopen
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 400, in open
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 512, in http_response
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 432, in error
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 372, in _call_chain
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 619, in http_error_302
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 394, in open
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 411, in _open
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 372, in _call_chain
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 1168, in do_open
File "C:\Program Files (x86)\IronPython 2.7\Lib\httplib.py", line 955, in request
File "C:\Program Files (x86)\IronPython 2.7\Lib\httplib.py", line 951, in endheaders
File "C:\Program Files (x86)\IronPython 2.7\Lib\httplib.py", line 811, in _send_output
File "C:\Program Files (x86)\IronPython 2.7\Lib\httplib.py", line 1158, in connect
File "C:\Program Files (x86)\IronPython 2.7\Lib\ssl.py", line 366, in wrap_socket
File "C:\Program Files (x86)\IronPython 2.7\Lib\ssl.py", line 133, in __init__
File "C:\Program Files (x86)\IronPython 2.7\Lib\ssl.py", line 295, in do_handshake
File "ez_setup.py", line 278, in <module>
File "ez_setup.py", line 210, in main
File "C:\Program Files (x86)\IronPython 2.7\Lib\urllib2.py", line 1207, in https_open
File "C:\Program Files (x86)\IronPython 2.7\Lib\httplib.py", line 989, in _send_request
File "C:\Program Files (x86)\IronPython 2.7\Lib\httplib.py", line 773, in send
IOError: System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
关于还有什么可以尝试的想法,或者这可能有用吗?
答案 0 :(得分:0)
我在我的硬盘上安装了常规(CPython),并将我的IronPython引擎setsearchpath Importing external module in IronPython添加到其Lib和Lib \ site-packages目录中。然后我可以将软件包安装到CPython中并在我的IronPython脚本中使用它们。但这可能对每个包都不起作用。