when i try pip install cffi, it says that cffi is already installed. have a look at my code again, im re-typing what command i typed and what error i am appearing on my screen-
pip install -r requirements.txt
Collecting bcrypt==3.1.4
Using cached bcrypt-3.1.4-cp34-abi3-manylinux1_x86_64.whl (51 kB)
Requirement already satisfied: blinker==1.4 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 2)) (1.4)
Requirement already satisfied: certifi==2016.2.28 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (2016.2.28)
Collecting cffi==1.11.5
Using cached cffi-1.11.5.tar.gz (438 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: click==6.7 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 5)) (6.7)
Collecting Flask==1.0
Using cached Flask-1.0-py2.py3-none-any.whl (97 kB)
Collecting Flask-Bcrypt==0.7.1
Using cached Flask_Bcrypt-0.7.1-py3-none-any.whl
Collecting Flask-Login==0.4.1
Using cached Flask_Login-0.4.1-py2.py3-none-any.whl
Collecting Flask-Mail==0.9.1
Using cached Flask_Mail-0.9.1-py3-none-any.whl
Collecting Flask-SQLAlchemy==2.3.2
Using cached Flask_SQLAlchemy-2.3.2-py2.py3-none-any.whl (16 kB)
Collecting Flask-WTF==0.14.2
Using cached Flask_WTF-0.14.2-py2.py3-none-any.whl (14 kB)
Requirement already satisfied: itsdangerous==0.24 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 12)) (0.24)
Requirement already satisfied: Jinja2==2.10 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 13)) (2.10)
Requirement already satisfied: MarkupSafe==1.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 14)) (1.0)
Requirement already satisfied: Pillow==5.3.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 15)) (5.3.0)
Requirement already satisfied: pycparser==2.18 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 16)) (2.18)
Requirement already satisfied: six==1.11.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 17)) (1.11.0)
Requirement already satisfied: SQLAlchemy==1.2.7 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 18)) (1.2.7)
Requirement already satisfied: Werkzeug==0.14.1 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 19)) (0.14.1)
Requirement already satisfied: WTForms==2.1 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 20)) (2.1)
Building wheels for collected packages: cffi
Building wheel for cffi (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [73 lines of output]
c/_cffi_backend.c: In function ‘ctypedescr_dealloc’:
c/_cffi_backend.c:405:23: error: lvalue required as left operand of assignment
405 | Py_REFCNT(ct) = 43;
| ^
c/_cffi_backend.c:408:23: error: lvalue required as left operand of assignment
408 | Py_REFCNT(ct) = 0;
| ^
c/_cffi_backend.c: In function ‘b_do_dlopen’:
c/_cffi_backend.c:4197:31: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
4197 | *p_printable_filename = PyText_AsUTF8(s);
| ^
c/_cffi_backend.c: In function ‘prepare_callback_info_tuple’:
c/_cffi_backend.c:5856:5: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
5856 | PyEval_InitThreads();
| ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.10/Python.h:130,
from c/_cffi_backend.c:2:
/usr/include/python3.10/ceval.h:122:37: note: declared here
122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
| ^~~~~~~~~~~~~~~~~~
c/_cffi_backend.c: In function ‘b_callback’:
c/_cffi_backend.c:5911:5: warning: ‘ffi_prep_closure’ is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations]
5911 | if (ffi_prep_closure(closure, &cif_descr->cif,
| ^~
In file included from c/_cffi_backend.c:15:
/usr/include/x86_64-linux-gnu/ffi.h:347:1: note: declared here
347 | ffi_prep_closure (ffi_closure*,
| ^~~~~~~~~~~~~~~~
In file included from c/cffi1_module.c:20,
from c/_cffi_backend.c:7370:
c/call_python.c: In function ‘_get_interpstate_dict’:
c/call_python.c:20:30: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’}
20 | builtins = tstate->interp->builtins;
| ^~
c/call_python.c: In function ‘_update_cache_to_call_python’:
c/call_python.c:160:39: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’}
160 | new1 = PyThreadState_GET()->interp->modules;
| ^~
c/call_python.c: In function ‘cffi_call_python’:
c/call_python.c:249:63: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’}
249 | if (externpy->reserved1 != PyThreadState_GET()->interp->modules) {
| ^~
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: cffi, Flask, bcrypt, Flask-WTF, Flask-SQLAlchemy, Flask-Mail, Flask-Login, Flask-Bcrypt
Attempting uninstall: cffi
Found existing installation: cffi 1.15.1
Uninstalling cffi-1.15.1:
Successfully uninstalled cffi-1.15.1
Running setup.py install for cffi ... error
error: subprocess-exited-with-error
× Running setup.py install for cffi did not run successfully.
│ exit code: 1
╰─> [75 lines of output]
c/_cffi_backend.c: In function ‘ctypedescr_dealloc’:
c/_cffi_backend.c:405:23: error: lvalue required as left operand of assignment
405 | Py_REFCNT(ct) = 43;
| ^
c/_cffi_backend.c:408:23: error: lvalue required as left operand of assignment
408 | Py_REFCNT(ct) = 0;
| ^
c/_cffi_backend.c: In function ‘b_do_dlopen’:
c/_cffi_backend.c:4197:31: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
4197 | *p_printable_filename = PyText_AsUTF8(s);
| ^
c/_cffi_backend.c: In function ‘prepare_callback_info_tuple’:
c/_cffi_backend.c:5856:5: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
5856 | PyEval_InitThreads();
| ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.10/Python.h:130,
from c/_cffi_backend.c:2:
/usr/include/python3.10/ceval.h:122:37: note: declared here
122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
| ^~~~~~~~~~~~~~~~~~
c/_cffi_backend.c: In function ‘b_callback’:
c/_cffi_backend.c:5911:5: warning: ‘ffi_prep_closure’ is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations]
5911 | if (ffi_prep_closure(closure, &cif_descr->cif,
| ^~
In file included from c/_cffi_backend.c:15:
/usr/include/x86_64-linux-gnu/ffi.h:347:1: note: declared here
347 | ffi_prep_closure (ffi_closure*,
| ^~~~~~~~~~~~~~~~
In file included from c/cffi1_module.c:20,
from c/_cffi_backend.c:7370:
c/call_python.c: In function ‘_get_interpstate_dict’:
c/call_python.c:20:30: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’}
20 | builtins = tstate->interp->builtins;
| ^~
c/call_python.c: In function ‘_update_cache_to_call_python’:
c/call_python.c:160:39: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’}
160 | new1 = PyThreadState_GET()->interp->modules;
| ^~
c/call_python.c: In function ‘cffi_call_python’:
c/call_python.c:249:63: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’}
249 | if (externpy->reserved1 != PyThreadState_GET()->interp->modules) {
| ^~
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Rolling back uninstall of cffi
Moving to /home/aalam/Flask_Blog/venv/lib/python3.10/site-packages/_
cffi_backend.cpython-310-x86_64-linux-gnu.so from /tmp/pip-uninstall-x9efh4j1/_
cffi_backend.cpython-310-x86_64-linux-gnu.so Moving to /home/aalam/Flask_Blog/venv/lib/python3.10/site-packages/cffi-1.15.1.dist-info/
from /home/aalam/Flask_Blog/venv/lib/python3.10/site-packages/~ffi-1.15.1.dist-info
Moving to /home/aalam/Flask_Blog/venv/lib/python3.10/site-packages/cffi/
from /home/aalam/Flask_Blog/venv/lib/python3.10/site-packages/~ffi
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> cffi