问题
I'm using PTVS 2.1 with IronPython 2.7.4 in Visual Studio Express 2013 for Windows Desktop with Update 3 on a Windows 8.1 Pro x64 host with .NET 4.5 installed. I have an empty Python project with default env set to IronPython 2.7. When I want to a virtual environment to the project PTVS tries to download setuptools and pip and fails miserably. The full log of the operation is here. In a gist it fails with:
System.IO.IOException
"Authentication failed because the remote party has closed the transport stream."
The IOError
seems to be thrown when invoking the urlopen
function. I've modified the sources so it tries downloading packages though http
as well as https
, but both gives same exceptions. PTVS executes everything without problems when working within official Python 2.7.8 environment.
I'm stuck with this problem. I can't install setuptools for IronPython through PTVS. Script provided in instructions at setuptools' PyPi page also uses openurl
and fails with the same error.
Is there a way to install/use setuptools
within IronPython env?
回答1:
once 2.7.5 will be released, it will include a back port of ensurepip. Installing pip and setuptool is as simple as invoking:
ipy -X:Frames -m ensurepip
At the moment you can use 2.7.5b3 as a best approximation. Older versions of IronPython may work with some older versions of setuptools or pip but the record is spotty.
来源:https://stackoverflow.com/questions/26663366/python-tools-for-visual-studio-cant-download-setuptools-on-ironpython