Error: no module named 'fcntl'
I am getting the following error:
Traceback (most recent call last):
File "C:/Users/aaaa/Desktop/ttttttt.py", line 5, in <module>
import reload
File "C:\Users\aaa\AppData\Local\Programs\Python\Python36\lib\site-
packages\reload.py", line 3, in <module>
import sys, time, re, os, signal, fcntl
ModuleNotFoundError: No module named 'fcntl'
So I did a pip install which also gets the error.
C:\Users\aaaa>pip install fcntl
Collecting fcntl
Could not find a version that satisfies the requirement fcntl (from versions: )
No matching distribution found for fcntl
CPython search results, hacking, routing and many other words come out.
This is a difficult answer for newbies, so I want a more detailed solution.
How can I solve it?
#py3
import time
from selenium import webdriver
import codecs
import sys
import reload
import re
import fcntl
import os
import signal
+3
source to share
1 answer
The module is fcntl
not available on Windows. The functionality it provides does not exist on this platform.
If you are trying to lock a file, there are some other Python modules that provide this functionality. One of the ones I've seen in other answers is portalocker
.
+2
source to share