473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Python, readline and OS X

I have installed Python 2.5 on my new Intel Mac but I can't for the life
of me get readline to work. I have libreadline installed, I've tried
copying readline.so from my Python 2.3 installation into 2.5, I've
searched the web, and no joy. Could someone please give me a clue?

rg
Feb 1 '07 #1
7 2196
Ron Garret wrote:
I have installed Python 2.5 on my new Intel Mac but I can't for the life
of me get readline to work. I have libreadline installed, I've tried
copying readline.so from my Python 2.3 installation into 2.5, I've
searched the web, and no joy. Could someone please give me a clue?

rg
Where have you installed libreadline? Is LD_LIBRARY_PATH pointing to the
directory libreadline.dylib? Did you install libreadline with fink? If
so, try

setenv LD_LIBRARY_PATH /sw/lib

before compiling (csh).

Bash (OSX default) and similar shells use this silly 2 part syntax:

LD_LIBRARY_PATH=/sw/lib
export LD_LIBRARY_PATH

Do a "locate libreadline.dylib" and set the LD_LIBRARY_PATH to the
containing directory and then

make clean
./configure
make
make install

or similar.
Feb 1 '07 #2
Ron Garret wrote:
I have installed Python 2.5 on my new Intel Mac but I can't for the life
of me get readline to work. I have libreadline installed, I've tried
copying readline.so from my Python 2.3 installation into 2.5, I've
searched the web, and no joy. Could someone please give me a clue?

rg
Does the info in a blog article that I wrote help?

http://www.razorvine.net/frog/user/i.../2006-05-08/87

I used this when I compiled my Python 2.5 on my mac, and
it seemed to work ;-)

I'm now using the python.org binary distribution though and that seems to
contain a working readline as well.... ?

--Irmen
Feb 2 '07 #3
In article <45*********************@news.xs4all.nl>,
Irmen de Jong <ir**********@xs4all.nlwrote:
Ron Garret wrote:
I have installed Python 2.5 on my new Intel Mac but I can't for the life
of me get readline to work. I have libreadline installed, I've tried
copying readline.so from my Python 2.3 installation into 2.5, I've
searched the web, and no joy. Could someone please give me a clue?

rg

Does the info in a blog article that I wrote help?

http://www.razorvine.net/frog/user/i.../2006-05-08/87
No, because I'm not using Fink. But maybe I can adapt your solution.
I used this when I compiled my Python 2.5 on my mac, and
it seemed to work ;-)

I'm now using the python.org binary distribution though and that seems to
contain a working readline as well.... ?
I'll try that too.

rg
Feb 2 '07 #4
In article <ep**********@daisy.noc.ucla.edu>,
James Stroud <js*****@mbi.ucla.eduwrote:
Ron Garret wrote:
I have installed Python 2.5 on my new Intel Mac but I can't for the life
of me get readline to work. I have libreadline installed, I've tried
copying readline.so from my Python 2.3 installation into 2.5, I've
searched the web, and no joy. Could someone please give me a clue?

rg

Where have you installed libreadline?
/usr/local/lib
Is LD_LIBRARY_PATH pointing to the directory libreadline.dylib?
It wasn't, but changing it so it did didn't fix the problem. (I didn't
try recompiling Python, just running it. I'll try rebuilding later.)
Did you install libreadline with fink?
No, I just got the source from the FSF and did ./configure ; make install
Bash (OSX default) and similar shells use this silly 2 part syntax:

LD_LIBRARY_PATH=/sw/lib
export LD_LIBRARY_PATH
Actually you can do it in one line: export LD_LIBRARY_PATH=whatever

:-)
Do a "locate libreadline.dylib" and set the LD_LIBRARY_PATH to the
containing directory and then

make clean
./configure
make
make install

or similar.
I'll give that a whirl. Thanks.

rg
Feb 2 '07 #5
Ron Garret wrote:
In article <ep**********@daisy.noc.ucla.edu>,
James Stroud <js*****@mbi.ucla.eduwrote:
>>Is LD_LIBRARY_PATH pointing to the directory libreadline.dylib?


It wasn't, but changing it so it did didn't fix the problem. (I didn't
try recompiling Python, just running it. I'll try rebuilding later.)
You must re-compile python, starting with configure so that configure
can identify the readline libraries. Otherwise it will compile with no
readline, which is your current situation
>>Bash (OSX default) and similar shells use this silly 2 part syntax:

LD_LIBRARY_PATH=/sw/lib
export LD_LIBRARY_PATH

Actually you can do it in one line: export LD_LIBRARY_PATH=whatever
Ok. Now I'll switch to bash.

James
Feb 2 '07 #6
In article <ep**********@zinnia.noc.ucla.edu>,
James Stroud <js*****@mbi.ucla.eduwrote:
Ron Garret wrote:
In article <ep**********@daisy.noc.ucla.edu>,
James Stroud <js*****@mbi.ucla.eduwrote:
>Is LD_LIBRARY_PATH pointing to the directory libreadline.dylib?

It wasn't, but changing it so it did didn't fix the problem. (I didn't
try recompiling Python, just running it. I'll try rebuilding later.)

You must re-compile python, starting with configure so that configure
can identify the readline libraries. Otherwise it will compile with no
readline, which is your current situation
That did the trick. Thanks!

rg
Feb 2 '07 #7
Hi James, hi Ron,
Where have you installed libreadline? Is LD_LIBRARY_PATH pointing to the
directory libreadline.dylib? Did you install libreadline with fink? If
so, try

setenv LD_LIBRARY_PATH /sw/lib
That would probably make no difference since on Mac OS X that variable
is called DYLD_LIBRARY_PATH (contrary to SysV Unices).
Bash (OSX default) and similar shells use this silly 2 part syntax:

LD_LIBRARY_PATH=/sw/lib
export LD_LIBRARY_PATH
It's just your way of using it that makes it a 2 part syntax:

export DYLD_LIBRARY_PATH=/sw/lib

does the trick. And by the way: the bash construct is far less error
prone regarding quoting when used in shell scripts.

Mark
Feb 2 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Baggs | last post by:
Guys/Gals I've messed up my Python 2.4 install. I'm really new to Python (and Linux for that matter) and really wanted to try Python out. I have mandrake 10.1. The first thing I did was...
7
by: Erik Johnson | last post by:
I am trying to upgrade my Python installation. After downloading sources and building Python 2.3.4, I am unable to use the command history editing feature in the interactive interpreter (where the...
15
by: Ashot | last post by:
This is sort of both Python and Vim related (which is why I've posted to both newsgroups). Python related: ---------------------- I have been frustrated for quite some time with a lack of a...
30
by: bblais | last post by:
Hello, Let me start by saying that I am coming from a background using Matlab (or Octave), and C++. I am going to outline the basic nuts-and-bolts of how I work in these languages, and ask for...
0
by: ktelep | last post by:
I'm trying to build python 2.4.2 on AIX 5.3 with the IBM xlC compiler as per the notes in the AIX Readme file. Basically my make fails with the errors listed below. I'm calling configure with:...
14
by: Bill | last post by:
I've written a small program that, in part, reads in a file and parses it. Sometimes, the file is gzipped. The code that I use to get the file object is like so: if filename.endswith(".gz"):...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 375 open ( -3) / 3264 closed (+26) / 3639 total (+23) Bugs : 910 open ( +3) / 5851 closed (+20) / 6761 total (+23) RFE : 217 open...
0
by: Akira Kitada | last post by:
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb ...
0
by: Akira Kitada | last post by:
Hi Marc-Andre, Thanks for the suggestion. I opened a ticket for this issue: http://bugs.python.org/issue4204 Now I understand the state of the multiprocessing module, but it's too bad to see...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.