winpexpect,pywintypes.error:(2,'CreateProcess'

时间:2018-07-03 00:54:01

标签: winpexpect

我正在尝试使用winpexpect。 不幸的是,我正在查看CreateProcess错误。 有人可以帮我修复吗?

条件: 1.在Windows 10(64位)的虚拟环境中使用python 2.7(32位)。

(venv27) PS D:\Programming\GTAC\japan> pip install winpexpect
Collecting winpexpect
  Downloading https://files.pythonhosted.org/packages/37/57/3df67779daed66a6c95cdd8cc08d4822a7d4426ef27a1268ab509a12f0a5/winpexpect-1.5.tar.gz
Collecting pywin32>=214 (from winpexpect)
  Downloading https://files.pythonhosted.org/packages/a0/76/89b836562a36929bb913f9c17fca54fdd2c68b5e97ec0d626a389c087150/pywin32-223-cp27-cp27m-win32.whl (6.8MB)
    100% |################################| 6.8MB 1.3MB/s
Building wheels for collected packages: winpexpect
  Running setup.py bdist_wheel for winpexpect ... done
  Stored in directory: C:\Users\atmos\AppData\Local\pip\Cache\wheels\01\62\61\7d58a7cb713e7fd60679e77cd949f7142bfcf5ca2853d7f9ca
Successfully built winpexpect
Installing collected packages: pywin32, winpexpect
Successfully installed pywin32-223 winpexpect-1.5

(venv27) PS D:\Programming\GTAC\japan> python
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import winpexpect
>>> import sys, winpexpect
>>> child = winpexpect.winspawn('nslookup')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Programming\venv\venv27\lib\site-packages\winpexpect.py", line 346, in __init__
    logfile=logfile, cwd=cwd, env=env)
  File "D:\Programming\venv\venv27\lib\site-packages\pexpect.py", line 429, in __init__
    self._spawn (command, args)
  File "D:\Programming\venv\venv27\lib\site-packages\winpexpect.py", line 401, in _spawn
    startupinfo)
pywintypes.error: (2, 'CreateProcess', '\xc1\xf6\xc1\xa4\xb5\xc8 \xc6\xc4\xc0\xcf\xc0\xbb \xc3\xa3\xc0\xbb \xbc\xf6 \xbe\xf8\xbd\xc0\xb4\xcf\xb4\xd9.')

0 个答案:

没有答案