The user site directory should be the right directory for such things.
python -m site --user-site
shows you the correct path for your platform. Usually its something like
$HOME/.local/lib/python<version>/site-packages
You can even put a module sitecustomize.py
there which will be imported automatically on each interperter startup.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…