Python path issues in Terminal

  • Thread starter Thread starter Qaaolchoura
  • Start date Start date
Q

Qaaolchoura

Hi, I've had a problem with Python in the Terminal which I've known for awhile, but always avoided by using IDLE. Unfortunately, I'm trying to learn Django, which isn't IDLE-compatible (and doesn't even like working in Python mode in the Terminal) so I need to fix it. The problem is this:

  1. Python, as accessed by the Terminal's "python command" is stored under user/local/lib
  2. Python's packages, as installed by apt-get, aptitude, or pip, install under user/lib

Thus, I can't import packages from the terminal without changing the path, and the path only stays changed for one python session. After looking up how to modify the path permanently, and finding at least one method which still only works temporarily, I've found that most posts on the topic say that modifying the path is a hackish attempt to cover up deeper issues.

I know what those deeper issues are. I don't know how to either change the default install of packages to usr/local/lib, or change the python command in terminal to work from usr/lib. I could of course try to copy everything from user/lib to usr/local/lib, but I'm worried that might introduce some other issues.

Any thoughts?

Thanks,
~Q

Continue reading...
 
Back
Top