这里怎么了?你知道吗
$ python -V
Python 2.7.5
我已经安装了pip install pexcept
现在当我加载它时
$ python
Python 2.7.5 (default, Jul 13 2018, 13:06:57)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pexpect
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pexpect.py", line 10, in <module>
child = pexpect.spawn('ssh %s@%s' % (switch_un, switch_ip))
AttributeError: 'module' object has no attribute 'spawn'
>>>
运行Linux CentOS 7.x版本(64位)
如前所述HERE
pexpect
主要用于基于UNIX的操作系统。使用windows时会出现此错误。你知道吗相关问题 更多 >
编程相关推荐