• The directory (or directories) where your application‘s modules live.
– If your code is under src/, add the project’s root or src/.
• Any “vendor” or in-repo libraries you want to import.
• Avoid stuffing your entire hard-drive in there—only the minimal directories you need.
import sys
sys.path.insert(0, "/path/to/my/modules") # put your code first
Virtual environments automatically isolate sys.path to your project.
By keeping your sys.path minimal—just your script’s folder, the stdlib, site-packages, and any extra dirs you explicitly need—you’ll avoid import-conflicts, accidental imports of the wrong version, and sluggish startup times.