Activate the failing virtualenv and confirm which Python and package installer it reports.

List installed packages in that environment and check the cffi version.

Reinstall cffi into the active environment, forcing a reinstall so the compiled backend file is recreated.

Run a short import test for cffi and for the package that failed, such as cryptography.

If the import still fails, delete and recreate the virtualenv with the current Python, then install the project requirements fresh.