ModuleNotFoundError: No module named 'fcntl'

24,327

Solution 1

The module fctnl is not available on Windows systems

Solution 2

It has already been mentioned in https://stackoverflow.com/a/11087777/12362709 (thanks to @Necklondon) but copying it here since it's useful:

pip install waitress
waitress-serve --listen=*:8000 app:app
Share:
24,327
Shubham Singh
Author by

Shubham Singh

Updated on July 11, 2022

Comments

  • Shubham Singh
    Shubham Singh almost 2 years

    for flask application run using gunicorn

    $ pip install gunicorn
    $ gunicorn --bind 0.0.0.0:8000 app:app
    

    getting error

    Traceback (most recent call last): File "C:\Users\shubham\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\shubham\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in run_code exec(code, run_globals) File "C:\Users\shubham\Desktop\Full_stack_developer\venv\Scripts\gunicorn.exe_main.py", line 5, in File "c:\users\shubham\desktop\full_stack_developer\venv\lib\site-packages\gunicorn\app\wsgiapp.py", line 9, in from gunicorn.app.base import Application File "c:\users\shubham\desktop\full_stack_developer\venv\lib\site-packages\gunicorn\app\base.py", line 11, in from gunicorn import util File "c:\users\shubham\desktop\full_stack_developer\venv\lib\site-packages\gunicorn\util.py", line 9, in import fcntl ModuleNotFoundError: No module named 'fcntl'