Python 2.7.5在Cygwin64上:请求安装失败 [英] Python 2.7.5 on Cygwin64: requests installation fails

查看:299
本文介绍了Python 2.7.5在Cygwin64上:请求安装失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的项目主要是基于J2EE的开发,具有用Python编写的自动功能和集成测试。测试环境是Linux,但开发人员使用Windows 7(64位)。我们希望能够在开发机器上执行功能测试(在开发之前)。很抱歉, pexpect-windows-portability 问题会离开我们别无选择,只是:

Our project is a mostly J2EE based development with the automatic functional and integration tests written in Python. The test environment is Linux nonetheless developers use Windows 7 (64-bit). We would like to be able to execute the functional tests on the developer machines as well (before comitting). Unfortunately the pexpect-windows-portability issue would leave us no choice but:


  1. 对我们的测试库做一些严重的重构,以便能够使用winpexpect(或wexpect)和pexpect

  2. 或使用cygwin。猜猜,第二个选项,我们似乎有一个问题:-) 在Cygwin64上使用Python 2.7.5安装请求包导致错误

    • pip说下载并解压后找不到文件库

    • 轻松安装不会引起显式错误,但会将所有内容留在临时文件夹

    • -packages 目录中的简单导入请求在python中导致解释器退出

  1. To do some serious refactoring on our test libraries to be able to use both winpexpect (or wexpect) and pexpect depending on the os settings.
  2. Or to use cygwin. Guess what, with this second option we seem to have an issue :-) Using Python 2.7.5 on Cygwin64 installing the requests package results in error:
    • pip says it can not find a file after downloading and extracting the library
    • easy install doesn't throw an explicit error, but leaves everything in the temporary dir
    • after copying the files under the site-packages directory a simple import requests in python causes the interpreter to exit

有人遇到这个问题吗? Cygwin-32请求安装顺利。(但我们还有其他问题 - 请参阅我的下一篇文章;)

Has anybody encountered this problem? With Cygwin-32 requests install smoothly. (however we have some other issues - see my next post ;-))

:Joe,public

Thank you in advance: Joe, the public

推荐答案

更新:这应该在Cygwin中修复。

Update: This should be fixed in Cygwin.

这是CPython中的一个错误,已在其主分支中修复。我将一个候选包推送到Cygwin的Python维护者,但您可以尝试此修补程序

This was a bug in CPython that has been fixed in their master branch. I've pushed a candidate package to the Python maintainer for Cygwin, but you might try this hotfix.

这篇关于Python 2.7.5在Cygwin64上:请求安装失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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