FileNotFoundError:[WinError 2]使用Pyinstaller执行PPTK库

时间:2020-01-21 13:23:01

标签: python subprocess pyinstaller popen pptk

我正在使用Pyinstaller从我的使用PPTK库的python代码中编译一个.exe文件。但是,当我执行创建的.exe文件时,出现以下错误:

Traceback (most recent call last):
  File "Clasex.py", line 251, in PointCloud_Viewer
  File "site-packages\pptk\viewer\viewer.py", line 53, in __init__
  File "subprocess.py", line 775, in __init__
  File "subprocess.py", line 1178, in _execute_child
FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado 

在库pptk的文件viewer.py的第53行中检测到此错误,其中包含以下信息:

self._process = subprocess.Popen(
    [os.path.join(_viewer_dir, 'viewer'), str(s.getsockname()[1])],
    stdout=subprocess.PIPE,
    stderr=(None if debug else subprocess.PIPE))

如何修改subprocess.Popen以便在.exe文件中工作?谢谢!

0 个答案:

没有答案