4

Is it possible to install and use pip with IronPython via the commandline? (I am not doing this via PTVS.)

Things I have tried already:

  • Looked at this SO question: Installing Python Packages - IronPython, but it hasn't been answered or updated for more than a year.
  • Looked at this answer on Yahoo, but the link to distribute_setup.py is broken. I got a copy from here: distribute_setup.py, it terminates with this:

    IOError: System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
    
  • Taken a look at the pip docs, but this is obviously for CPython, not IronPython.

  • Followed the steps on Steps to installing setuptools on IronPython. According to the comments, it worked in August last year, but I got the same error as above:

    IOError: System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
    
  • Taken a look at the full output of these errors. It seems to pick up the egg, but fails later on in the process during a call to 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.
    

Any ideas on what else to try, or if this is likely to work at all?

2
  • please check stackoverflow.com/questions/26663366/… Commented Nov 5, 2014 at 6:38
  • Thanks @PawelJasinski! I had tried that, but not with IronPython 2.7.5b3. I guess this question should be marked a duplicate, but I don't think I have the rep to do it. Commented Nov 5, 2014 at 10:14

1 Answer 1

1

I installed regular (CPython) on my hard drive and had my IronPython Engine setsearchpaths Importing external module in IronPython to its Lib and Lib\site-packages directories. I could then install packages into CPython and use them in my IronPython scripts. This may not work for every package though.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.