python文件中导入了fcntl,运行的时候显示ImportError: No module named fcntl
因而各类百度,最后发现windows中的python2不自带fcntl并且这个模块pip也是安装不上的
解决办法:在python路径下的Lib中新建一个fcntl.py文件内容以下:python
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