To add the directory to my python path, I went into the command line, did “open -e .bash_profile”, which opened it up in TextEdit. I then added the directory which I just created called “coltrane”, so the bash file looked like this after edit:

Then I went into the python interactive session and did “import sys” and “print sys.path” to test if the edit was successful. It gave me this:

As you can see, the directory “coltrane” is the first path on sys.path. But then I tried to import “coltrane” and it doesn’t recognize it:

Any idea why this is happening? Did I write it the wrong way in .bash_profile?
thnx
You added the
coltranedirectory to the path, and I assume that’s the module you want to import (that is, you have an__init__.pyin that directory to make the directory itself a module). But you want to add the directory that contains the module you want to import, i.e.,djangoprojects, to your path, because thePYTHONPATHtells Python what directories to look in for modules.