Where should I put my own python module so that it can be imported

I usually put the stuff i want to have ready to import in the user site directory:

~/.local/lib/pythonX.X/site-packages

To show the right directory for your platform, you can use python -m site --user-site


edit: it will show up in sys.path once you create it:

mkdir -p "`python -m site --user-site`"

Leave a Comment