Hi,
It is an old topic, but just in case still helps someone that figured out yet…
If your context is the same as @ jiapei100 and mine, which is building your “own” python from cpython source code repository (forked). In my case for my C programs to run, I have setup this configuration:
export PYTHONHOME=/<path-to-your-local-repo>/cpython
export PYTHONPATH=/<path-to-your-local-repo>/cpython/Lib