无法使用 cygwin 运行 pexect

发布于 2024-08-30 22:02:30 字数 699 浏览 5 评论 0原文

在 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 可以与从 Cygwin 调用的 Windows 版 Python 一起使用吗?

Getting following errors while executing the pexpect example file at a Cygwin prompt.
Can anyone help?

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.

Can Pexpect work with a Python for Windows, invoked from Cygwin?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇纵 2024-09-06 22:02:30

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

Try to install Python from cygwin. I mean cygwin's Python, that can be installed

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文