无法使用cygwin运行pexect

时间:2010-04-29 09:27:58

标签: python windows cygwin pexpect

在Cygwin提示符下执行pexpect示例文件时出现以下错误。 有人可以帮忙吗?

Administrator@INDSQA2253 /cygdrive/c/Python26/Tools/pexpect-2.1/examples
$ python ssh_session.py
Traceback (most recent call last):
  File "ssh_session.py", line 7, in <module>
    from pexpect import *
  File "c:\Python26\lib\site-packages\pexpect.py", line 83, in <module>
    Pexpect is intended for UNIX-like operating systems.""")
ImportError: No module named resource
A critical module was not found. Probably this operating system does not support
 it.
Pexpect is intended for UNIX-like operating systems.

Pexpect可以使用Python for Windows,从Cygwin调用吗?

1 个答案:

答案 0 :(得分:1)

尝试从cygwin安装Python。我的意思是cygwin的Python,可以安装