If you're using bash (on a Mac or GNU/Linux distro), add this to your ~/.bashrc
export PYTHONPATH=$PYTHONPATH:/my/other/path
Make sure the directory you point to has at the topmost init.py file in your directory structure.
For example, I tried export PYTHONPATH=$PYTHONPATH:/Users/joey/repos but it did not work because my repos directory did not have _init_.py.
Going down one directory further: /Users/joey/repos/specificRepo did the trick. Now python can traverse any downward directory connected to the specificRepo directory that contains a init.py !
If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged
No comments:
Write comments