LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-17-2008, 11:05 PM   #1
LinczO_Dz
LQ Newbie
 
Registered: Apr 2008
Posts: 11

Rep: Reputation: 0
Unhappy [help]---Can't find Python library python2.5


Now I have installed Python2.5. when I want to copmile a tools call M5.
I use this cmd line:
$scons build/ALPHA_SE/test/debug/quickt
(scons is a tool which is similiar to make )
the result is:

Checking for C headler file Python.h ...yes
Adding /usr/local/lib to LIBPATH for python2.5
Checking for C library python2.5 ... no
Error: can't find Python library python2.5

Is there anyone who knows how to deal with it.
Please be more detailed.

Thanks.
 
Old 04-18-2008, 03:16 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
1. check where the file resides:

find /usr -name libpython2.5.so.1

This shared object seems to be in a different directory than expected by your program. Maybe it helps to create a symlink to /usr/local/lib like
sudo ln -s /path/to/libpython2.5.so.1 /usr/local/lib/libpython2.5.so
 
Old 04-18-2008, 05:12 AM   #3
LinczO_Dz
LQ Newbie
 
Registered: Apr 2008
Posts: 11

Original Poster
Rep: Reputation: 0
I've tried but I can't find the file libpython2.5.so.1

my situation as follows:
/usr/local/bin has cmd python and python2.5
/usr/local/lib/python.2.5 has the python's py and pyo files

So my python2.5 lib lies in /usr/local/lib/python2.5 ,but it seems the system couldn't find it through env variable LIBPATH.

any help would bu appreciated.
Thanks.

Last edited by LinczO_Dz; 04-18-2008 at 05:15 AM.
 
Old 04-18-2008, 06:07 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Please have a look here:
http://m5.eecs.umich.edu/wiki/index....n_installation
(Using a non-default Python installation)
'libpython2.5.so.1': if you build python yourself, this option should be used to
get the shared library: '--enable-shared'
 
Old 04-18-2008, 06:16 AM   #5
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Is there any reason you installed python manually? In many cases, it is a lot easier to install it from a repository.
 
Old 04-18-2008, 10:33 PM   #6
LinczO_Dz
LQ Newbie
 
Registered: Apr 2008
Posts: 11

Original Poster
Rep: Reputation: 0
I have checked that the Python 2.5 is installed as /usr/bin/python2.5
and the Python2.5 library is in "/usr/local/lib" rather than "/usr/lib"

I have done these:
[Python2.5 path]$configure --enable-shared
[Python2.5 path]$make clean
[Python2.5 path]$make
[Python2.5 path]$make install

but is still says can't find Python library python2.5

The passage also says:
" typically by adding the directory to your LD_LIBRARY_PATH environment variable"
it means that add "/usr/local/lib" to LD_LIBRARY_PATH ?
How to find the env var LD_LIBRARY_PATH and modify it?

Thank you!
 
Old 04-19-2008, 10:09 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
I guess it's a good idea to have all python in one 'prefix'
So try instead: make clean, and move away these files:
Makefile, config.log, config.status (if there) and then:
./configure --enable-shared --prefix=/usr

(Concerning LD_LIBRARY_PATH I used to add a line to /etc/ld.so.conf :
/usr/local/lib )
 
  


Reply

Tags
help



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python2.5-devel is unable to find installed Python2.5 Setya SUSE / openSUSE 1 06-08-2007 01:35 AM
LXer: Python Phrasebook (Developer's Library) LXer Syndicated Linux News 0 11-16-2006 07:21 PM
simple 3d software library for python sajjadc Programming 2 08-12-2006 10:21 AM
choosing python networking library mohtasham1983 Programming 0 03-22-2006 03:48 PM
Best Python float array library? zero79 Programming 0 08-31-2005 05:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration