我正在尝试使用Pyinstaller将下面的python脚本转换为OpenWRT中的独立可执行文件。但是,我收到了错误消息。谁能给我一些如何解决它的暗示?谢谢!
root@mylinkit:/usr# cat test.py
#!/usr/bin/env python2.7
#coding:utf-8
print('Hello World!')
root@mylinkit:/usr# pyinstaller test.py
2948 INFO: PyInstaller: 3.2.1
2950 INFO: Python: 2.7.9
2964 INFO: Platform: Linux-3.18.23-mips-with-glibc2.0
2971 INFO: wrote /usr/test.spec
3019 INFO: UPX is not available.
3041 INFO: Extending PYTHONPATH with paths
['/usr', '/usr']
3045 INFO: checking Analysis
3048 INFO: Building Analysis because out00-Analysis.toc is non existent
3050 INFO: Initializing module dependency graph...
3106 INFO: Initializing module graph hooks...
6523 INFO: running Analysis out00-Analysis.toc
Traceback (most recent call last):
File "/usr/bin/pyinstaller", line 9, in <module>
load_entry_point('PyInstaller==3.2.1', 'console_scripts', 'pyinstaller')
()
File "/usr/lib/python2.7/site-packages/PyInstaller/__main__.py", line 90,
in run
run_build(pyi_config, spec_file, **vars(args))
File "/usr/lib/python2.7/site-packages/PyInstaller/__main__.py", line 46,
in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/usr/lib/python2.7/site-
packages/PyInstaller/building/build_main.py", line 788, in main
build(specfile, kw.get('distpath'), kw.get('workpath'),
kw.get('clean_build'))
File "/usr/lib/python2.7/site-
packages/PyInstaller/building/build_main.py", line 734, in build
exec(text, spec_namespace)
File "<string>", line 16, in <module>
File "/usr/lib/python2.7/site-
packages/PyInstaller/building/build_main.py", line 212, in __init__
self.__postinit__()
File "/usr/lib/python2.7/site-
packages/PyInstaller/building/datastruct.py", line 161, in __postinit__
self.assemble()
File "/usr/lib/python2.7/site-
packages/PyInstaller/building/build_main.py", line 373, in assemble
redirects=self.binding_redirects)[1:])
File "/usr/lib/python2.7/site-packages/PyInstaller/depend/bindepend.py",
line 227, in Dependencies
for lib, npth in selectImports(pth, xtrapath):
File "/usr/lib/python2.7/site-packages/PyInstaller/depend/bindepend.py",
line 500, in selectImports
dlls = getImports(pth)
File "/usr/lib/python2.7/site-packages/PyInstaller/depend/bindepend.py",
line 736, in getImports
return _getImports_ldd(pth)
File "/usr/lib/python2.7/site-packages/PyInstaller/depend/bindepend.py",
line 571, in _getImports_ldd
for line in compat.exec_command('ldd', pth).splitlines():
File "/usr/lib/python2.7/site-packages/PyInstaller/compat.py", line 350,
in exec_command
out = subprocess.Popen(cmdargs, stdout=subprocess.PIPE,
**kwargs).communicate()[0]
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
root@mylinkit:/usr#