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'
pythonflaskservergunicorn Share Follow asked Jul 8 2020 at 6:15 Shubham SinghShubham Singh 16111 gold badge11 silver badge55 bronze badges 0 Add a comment | 3 Answers 3 ActiveOldestScore 21 The module fctnl is not available on Windows systems Share Follow
The fcntl module is not available on Windows. The functionality it exposes does not exist on that platform. If you're trying to lock a file, there are some other Python modules available which provide that functionality. One I've seen referenced in other answers is portalocker. thank you for the reply.
The name of the module is incorrect The first reason of this error is the name of the module is incorrect, so you have to check out the module name that you had imported. For example, let's try to import os module with double s and see what will happen: as you can see, we got No module named 'oss'.
1 The name of the module is incorrect 2 The path of the module is incorrect 3 The Library is not installed More ...
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
The module fctnl is not available on Windows systems
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With