I write a cpp extension demo like Custom C++ and CUDA Extensions, but much simpler.
In a physical python environment, it work well, but when I switched to a python virtual environment (
python -m venv venv), it raise error.
Just in Time (JIT) are both. The former will report an error during installation, while the latter will report an error during runtime.
ImportError: No module named 'test_cpp'
verbose=True in JIT mode. I see the directory where the cpp extension was exists, but there is no
.o file in the directory.
I don’t know why. Is it that the Python virtual environment does not support cpp extensions? or do I need some extra settings?