中运行二进制我想运行一个lambda函数中这个工具:https://github.com/nicolas-f/7DTD-leaflet无法从蟒蛇AWS lambda函数
的工具依赖于枕头取决于在AWS拉姆达容器不可用影像库。为了解决这个问题,我运行了pyinstaller来创建一个我希望能够执行的二进制文件。该文件名为map_reader
,位于lambda zip包的顶层。
下面是我使用的尝试,并运行该工具的代码:
command = 'chmod 755 map_reader'
args = shlex.split(command)
print subprocess.Popen(args)
command = './map_reader -g "{}" -t "{}"'.format('/tmp/mapFiles', '/tmp/tiles')
args = shlex.split(command)
print subprocess.Popen(args)
这里是错误,这发生在第二subprocess.Popen
电话:
<subprocess.Popen object at 0x7f08fa100d10>
[Errno 13] Permission denied: OSError
如何运行这是否正确?
我猜你正在运行的环境确实如此不允许您将本地文件设置为可执行文件。 “权限被拒绝”可能正是它所说的。 – Blckknght