ModuleNotFoundError: No module named '_cffi_backend' using debug build of Python on Windows
I think pip
install script is not working correctly.
Here are the steps to reproduce:
- Download Python 3.8.10 for Windows
- During installation download debug binaries (it's a checkbox)
- Run
python_d.exe -m pip install -U cffi
- Launch
python_d.exe
and run
import cffi
cffi.FFI()
Expected: should succeed
Actual: ModuleNotFoundError: No module named '_cffi_backend'
What happens is that after step 3 above I get a file named _cffi_backend.cp38-win_amd64.pyd
in PYTHONHOME\Lib\site-packages
. I believe the file should be named _cffi_backend_d.cp38-win_amd64.pyd
to work with debug build of Python. Setup script should have detected that I am using debug build of Python, and should have built appropriate .pyd
file.