This library is specific to Linux, if you use this library in Windows system development, it will generate some errors, how to solve it?
Create a new fcntl.py file
DN_ACCESS = 1
DN_ATTRIB = 32
DN_CREATE = 4
DN_DELETE = 8
DN_MODIFY = 2
DN_MULTISHOT = 2147483648
DN_RENAME = 16
FASYNC = 8192
FD_CLOEXEC = 1
F_ADD_SEALS = 1033
F_DUPFD = 0
F_DUPFD_CLOEXEC = 1030
F_EXLCK = 4
F_GETFD = 1
F_GETFL = 3
F_GETLEASE = 1025
F_GETLK = 5
F_GETLK64 = 5
F_GETOWN = 9
F_GETSIG = 11
F_GET_SEALS = 1034
F_NOTIFY = 1026
F_RDLCK = 0
F_SEAL_GROW = 4
F_SEAL_SEAL = 1
F_SEAL_SHRINK = 2
F_SEAL_WRITE = 8
F_SETFD = 2
F_SETFL = 4
F_SETLEASE = 1024
F_SETLK = 6
F_SETLK64 = 6
F_SETLKW = 7
F_SETLKW64 = 7
F_SETOWN = 8
F_SETSIG = 10
F_SHLCK = 8
F_UNLCK = 2
F_WRLCK = 1
LOCK_EX = 2
LOCK_MAND = 32
LOCK_NB = 4
LOCK_READ = 64
LOCK_RW = 192
LOCK_SH = 1
LOCK_UN = 8
LOCK_WRITE = 128
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
Just find your Python path and put it in
C:\Users\{Username}\AppData\Local\Programs\Python\Python38\Lib\fcntl.py
Done!
Read More:
- Python installs virtualenv through PIP and always reports an error: response.py“, line 438, in _error_catcher yield
- Python 3 urllib has no URLEncode attribute
- [Solved] ModuleNotFoundError: No module named ‘requests‘
- Python Import Error: SystemError: Parent module ‘‘ not loaded, cannot perform relative import
- Pytorch CUDA Error: UserWarning: CUDA initialization: CUDA unknown error…
- Crawler overtime error socket.timeout: timed out/NameError: name ‘socket‘ is not defined
- [Mac Pro M1] Python3.9 import cv2 Error: Reason: image not found
- Python Use sqlalchemy Error: pymssql.ProgrammingError: (102, b“Incorrect syntax near ‘(‘.DB-Lib error
- About the solution of ERROR: Failed building wheel for dlib
- Raspberry pie Use PCA9685() Error: [Errno 121] Remote I/O error
- [Solved] Django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17).
- Python Error: SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3:
- [Solved] ERROR PythonRunner: Python worker exited unexpectedly (crashed)
- python3 ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833) Error
- Error in installing Python 3.6.8 for MacBook pyenv [Solved]
- Gunicorn Flask Error: [ERROR] Socket error processing request
- [Python] error in installing jupyter: defaulting to user installation because normal Requirement already satisfied
- [Solved] Error: [email protected]: wrong number of arguments (given 1, expected 0)
- [Solved] django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you install mysqlclie
- Python3 Fatal error in launcher: Unable to create process using ‘”‘