I have been combating this with a line in my .bashrc file:
export PYTHONPATH=/usr/local/lib/python2.6/dist-packages
So when I start python from the shell, everything works fine.
Problems show up when python is not executed from the shell, and thus
the path variable is never exported. This can occur when I have
launcher in the gnome panel or i'm executing from within wing-ide.
Is there a way to fix this so that the local dist-packages is added to
sys.path before the system directory ALWAYS? I can do this by editing
site.py but I think it's kind of bad form to do it this way. I feel
there has to be a way to do this without root privileges.
Any ideas?
Cheers,
Chris
I think you can modify sys.path inside your application.
Maybe this will work (at the top of your script):
import sys
sys.path[0] = "/usr/local/lib/python2.6/dist-packages"
import numpy
PS. Say hi to Steven for me!
~Sean
There has to be a way to do this...
Personally, I don't agree with the Debian maintainers in the order
they import anyway; it should be simple for me to overshadow system
packagers. But that's another story.
P.S. my first name is Steven!
Cheers,
Chris
Have you read my blog entry about my PEP 370?
http://lipyrary.blogspot.com/2009/08/how-to-add-new-module-search-path.html
Christian
Chris
In article <mailman.670.1251592...@python.org>,
Chris Colbert <scco...@gmail.com> wrote:
--
David C. Ullrich