title: Permanently adding a file path to sys.path in Python and module usage
body: <p>I am aware of
  <a href="https://stackoverflow.com/questions/12257747/permanently-adding-a-file-path-to-sys-path-in-python">Permanently adding a file path to sys.path in Python</a>
  and I have a specific follow-up question to this matter. I was uncertain if I should ask it from within (as it is many years old).</p>
  <p>I followed the answer, even so, I have not successfully implemented the PYTHONPATH variant of it (Not sure what I am doing wrong). Likewise, I have also read the aforementioned documentation, still I have some issues as described below.</p>
  <p>The part</p>
  <blockquote>
  <p>There are a few ways. One of the simplest is to create a my-paths.pth file (as described &gt;here). This is just a file with the extension .pth that you put into your system &gt;site-&gt;packages directory. On each line of the file you put one directory name, so you can &gt;put a line in there with /path/to/the/ and it will add that directory to the path.</p>
  </blockquote>
  <p>was helpful to me, so far, as I am now able to add specific paths to my</p>
  <pre><code>/usr/lib/python3/dist-packages
  </code></pre>
  <p>o all my python3 interpreters will find them. I also added an</p>
  <pre><code>myPackagesPython3.pth
  </code></pre>
  <p>in that folder. All paths therein specified show up when I execute</p>
  <pre><code>print(sys.path)
  </code></pre>
  <p><strong>BUT</strong> whenever I try to incorporate something like</p>
  <pre><code>from subFunctions import cameraSetup
  </code></pre>
  <p>I am unable to load in the functions defined within</p>
  <pre><code>cameraSetup.py
  </code></pre>
  <p>My desired working structure would be to have some Project A within a init.py, someSubfolder --&gt; within a init.py and someFunctions.py</p>
  <p>Then refer to <em>Project A</em> via</p>
  <pre><code>.pth
  </code></pre>
  <p>and use some variation of</p>
  <pre><code>import someFunction
  </code></pre>
  <p>Any Information as to why it seems to fail would be greatly appreciated, I am relatively new to python programming, and I am still trying to get a handle on it.</p>
  <p>A bit of Background (to whom it may concern):
  We are working with very particular cameras and their home-brewed software to get them to run. So, we are trying to separate the camera stream set up (Project A) from our actual development in the field of machine vision (Project B-ZZZ). So far, whenever I change the core files from Project A (new functions, knobs to regulate, UI, etc.) I hard copy the same file into all my other working directories (as I have looked into relative pathing within python but so far, always stopped again due to time constraints). This is of course bad practice, and it must be solvable.</p>
  <p>I am grateful for any and all advice.</p>