用于Visual Studio的Python工具无法在IronPython上下载`setuptools` [英] Python Tools for Visual Studio can't download `setuptools` on IronPython

查看:118
本文介绍了用于Visual Studio的Python工具无法在IronPython上下载`setuptools`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Visual Studio Express 2013 for Windows Desktop 中在上使用 PTVS 2.1 IronPython 2.7.4 已安装.NET 4.5的> Windows 8.1 Pro x64 主机.我有一个空的Python项目,默认环境设置为 IronPython 2.7 .当我想在虚拟环境中使用该项目时,PTVS尝试下载 setuptools pip ,但失败了.完整的操作日志在此处.要点在于:

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."

调用urlopen函数时,似乎抛出了IOError.我已经修改了源代码,因此它尝试通过httphttps来下载软件包,但是两者都给出了相同的例外.在官方Python 2.7.8环境中工作时,PTVS可以毫无问题地执行所有操作.

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.

我陷入了这个问题.我无法通过PTVS为IronPython安装 setuptools . setuptools' PyPi页面中的说明中提供的脚本也使用并以相同的错误失败.

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.

是否可以在IronPython env中安装/使用setuptools?

Is there a way to install/use setuptools within IronPython env?

推荐答案

2.7.5版一旦发布,它将包含surepip的后端口.安装pip和setuptool就像调用一样简单:

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

目前,您可以使用2.7.5b3作为最佳近似值. 较旧版本的IronPython可以与某些较旧版本的setuptools或pip一起使用,但记录不一.

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.

这篇关于用于Visual Studio的Python工具无法在IronPython上下载`setuptools`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆