在使用gunicorn部署flask程序时,出现No module named ‘fcntl’。具体报错如下:
按照上面的错误提示,我们发现当import fcnt1时,找不到了:
计划解决方案很简单,把下面手工写的代码文件fcnt1.py放在gunicorn目录下,解决原来的import的问题
#fcnt1.py
def fcntl(fd, op, arg=0):
return 0
def ioctl(fd, op, arg=0, mutable_flag=True):
if mutable_flag:
return 0
else:
return ""
def flock(fd, op):
return
def lockf(fd, operation, length=0, start=0, whence=0):
return
但是仍未解决,原因待查…