468,133 Members | 1,609 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,133 developers. It's quick & easy.

Re: How can I customize builtin module search path to prefix/lib toprefix/lib64?

On Sep 25, 10:41*am, js <ebgs...@gmail.comwrote:
Hi list,

Is it possible to change module search path (PYTHONPATH) built-in to
Python interpreter?
I thought I can change it with configure --libdir but it didn't work for me.
I also tried patching around python source tree replacing lib to lib64
but it didn't work either.

Adjusting sys.path directly or using environ should do the trick but
I'd rather want to make it the default path for my python

Thanks,
Why not just add a custom path file (*.pth)? EasyInstall, wx, PyWin32
and others do it. Of course there's always sys.path.append as well.

Mike
Sep 25 '08 #1
2 1522
js
For 64bit python, there's no need to look at lib/lib-dynload because
libraries for 64bit should be in
lib64/lib-dynload. Having module search path which point to libraries
the python can not understand
is, IMHO, wrong.

On Fri, Sep 26, 2008 at 3:03 AM, Mike Driscoll <ky******@gmail.comwrote:
On Sep 25, 10:41 am, js <ebgs...@gmail.comwrote:
>Hi list,

Is it possible to change module search path (PYTHONPATH) built-in to
Python interpreter?
I thought I can change it with configure --libdir but it didn't work for me.
I also tried patching around python source tree replacing lib to lib64
but it didn't work either.

Adjusting sys.path directly or using environ should do the trick but
I'd rather want to make it the default path for my python

Thanks,

Why not just add a custom path file (*.pth)? EasyInstall, wx, PyWin32
and others do it. Of course there's always sys.path.append as well.

Mike
--
http://mail.python.org/mailman/listinfo/python-list
Sep 25 '08 #2
js
In addition to that, .pth cannot prepend search path.
All thing it can do is appending to it.
In my case, I have to put lib64 before lib/.

On 9/26/08, js <eb*****@gmail.comwrote:
For 64bit python, there's no need to look at lib/lib-dynload because
libraries for 64bit should be in
lib64/lib-dynload. Having module search path which point to libraries
the python can not understand
is, IMHO, wrong.

On Fri, Sep 26, 2008 at 3:03 AM, Mike Driscoll <ky******@gmail.comwrote:
>On Sep 25, 10:41 am, js <ebgs...@gmail.comwrote:
>>Hi list,

Is it possible to change module search path (PYTHONPATH) built-in to
Python interpreter?
I thought I can change it with configure --libdir but it didn't work for
me.
I also tried patching around python source tree replacing lib to lib64
but it didn't work either.

Adjusting sys.path directly or using environ should do the trick but
I'd rather want to make it the default path for my python

Thanks,

Why not just add a custom path file (*.pth)? EasyInstall, wx, PyWin32
and others do it. Of course there's always sys.path.append as well.

Mike
--
http://mail.python.org/mailman/listinfo/python-list
Oct 1 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

70 posts views Thread by Michael Hoffman | last post: by
12 posts views Thread by Tekkaman | last post: by
8 posts views Thread by Joshua J. Kugler | last post: by
40 posts views Thread by rjcarr | last post: by
5 posts views Thread by koara | last post: by
8 posts views Thread by tow | last post: by
27 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.