Gary Church | 5 Oct 04:49
Picon

OS X Leopard readline problem with ipython despite recent fixes.

Hello good folks,

I've decided to learn python and found that ipython is the environment  
to work in. I've got everything working fine (tab completion, etc.)  
but for some reason the "u" key doesn't function from within ipython;  
the "U" key does, oddly enough.

If I start ipython with "ipython -noreadline", then the "u" key does  
work but, of course, no tab completion.

It's kind of hard to function without the "u" key so if someone has a  
suggestion...

This is what I have in my /Library/Python/2.5/site-packages/  directory:

Macintosh-4:~ gary$ ls -al /Library/Python/2.5/site-packages/
total 824
drwxrwxr-x  10 root  admin     340 Oct  4 19:29 .
drwxrwxr-x   3 root  admin     102 Oct  8  2007 ..
-rw-rw-r--   1 root  admin     119 Oct  5  2007 README
-rw-r--r--   1 gary  admin     335 Oct  4 19:29 easy-install.pth
drwxr-xr-x   5 gary  admin     170 Oct  4 15:52 ipython-0.9.1-py2.5.egg
drwxr-xr-x   5 gary  admin     170 Oct  4 15:54 nose-0.10.4-py2.5.egg
-rw-r--r--   1 root  admin   78583 Oct  4 15:55 pexpect-2.4-py2.5.egg
drwxr-xr-x   6 gary  admin     204 Oct  4 15:51 readline-2.5.1-py2.5- 
macosx-10.5-i386.egg
-rw-r--r--   1 root  wheel  326064 Oct  4 19:29  
setuptools-0.6c8_svn15fix.egg
-rw-r--r--   1 root  admin      32 Oct  4 19:29 setuptools.pth
Macintosh-4:~ gary$
(Continue reading)

Charlie Moad | 5 Oct 18:05
Picon

Re: OS X Leopard readline problem with ipython despite recent fixes.

I had a similar "b" key issue a while back.  I removed my ~/.ipython folder and it seemed to solve the problem.  Might work for you as well.

On Sat, Oct 4, 2008 at 10:49 PM, Gary Church <gary.church1 <at> comcast.net> wrote:
Hello good folks,

I've decided to learn python and found that ipython is the environment
to work in. I've got everything working fine (tab completion, etc.)
but for some reason the "u" key doesn't function from within ipython;
the "U" key does, oddly enough.

If I start ipython with "ipython -noreadline", then the "u" key does
work but, of course, no tab completion.

It's kind of hard to function without the "u" key so if someone has a
suggestion...

This is what I have in my /Library/Python/2.5/site-packages/  directory:

Macintosh-4:~ gary$ ls -al /Library/Python/2.5/site-packages/
total 824
drwxrwxr-x  10 root  admin     340 Oct  4 19:29 .
drwxrwxr-x   3 root  admin     102 Oct  8  2007 ..
-rw-rw-r--   1 root  admin     119 Oct  5  2007 README
-rw-r--r--   1 gary  admin     335 Oct  4 19:29 easy-install.pth
drwxr-xr-x   5 gary  admin     170 Oct  4 15:52 ipython-0.9.1-py2.5.egg
drwxr-xr-x   5 gary  admin     170 Oct  4 15:54 nose-0.10.4-py2.5.egg
-rw-r--r--   1 root  admin   78583 Oct  4 15:55 pexpect-2.4-py2.5.egg
drwxr-xr-x   6 gary  admin     204 Oct  4 15:51 readline-2.5.1-py2.5-
macosx-10.5-i386.egg
-rw-r--r--   1 root  wheel  326064 Oct  4 19:29
setuptools-0.6c8_svn15fix.egg
-rw-r--r--   1 root  admin      32 Oct  4 19:29 setuptools.pth
Macintosh-4:~ gary$

Thanks much,

Gary Church
gary.church1 <at> comcast.net



_______________________________________________
IPython-user mailing list
IPython-user <at> scipy.org
http://lists.ipython.scipy.org/mailman/listinfo/ipython-user

_______________________________________________
IPython-user mailing list
IPython-user <at> scipy.org
http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
David J Strozzi | 8 Oct 01:19

ipython and emacs: X queued for execution

Folks,

I am using ipython 0.9.1 with python 2.5.2 on an x86-64 cluster 
running a modified version of a fedora distribution.  I can 
reproducibly get a problem when running .py files from within emacs 
with ipython.  I start emacs.  I load the .py file.  I do C-c C-! 
which starts the interpreter (=ipython).  I do C-c C-c to run the .py 
file.  It runs (usually with an error since I'm debugging).  I change 
the file.  I do C-c C-c and nothing happens.  In the status line at 
the bottom I get

/usr/tmp/python..... queued for execution

and nothing happens.  I have to quit emacs and restart to be able to 
run anything with C-c C-c.

I noticed a post from a few years ago about this.  Apparently no resolution.

I can look and see what files get generated in /usr/tmp and 
elsewhere, maybe see if deleting some manually fixes things.  Either 
way I thought people should know about this.

Also, it's a little odd that the tmp files are in /usr/tmp/ instead 
of /usr/tmp/username/.

Thanks,
David Strozzi
Gary Church | 8 Oct 03:43
Picon

ipython problem on OS X leopard: non-responsive "u" key.

Hello ipython users,

I recently queried the list for help on a particularly annoying  
problem with ipython on OS X leopard. When I start ipython from a  
terminal (I use iterm but have tried in regular term as well)  
everything works fine except for the lower-case "u" key, which is  
unresponsive; nothing happens in iterm and I get a "beep" in term.

A kind list-dweller tried helping with some suggestions but, alas, the  
problem remains. This seems strange to me as all other functionality  
(TAB completion, etc...) is present.

If there are ipython, OS X leopard users on this list that aren't  
having any problems with ipython, maybe you could shed some light on  
my problem? I'm not sure where to start looking for a resolution so  
any suggestions are welcome :-)

Thanks much,
Gary

Gary Church
gary.church1 <at> comcast.net
Gary Church | 8 Oct 04:11
Picon

A bag of pythons on OS X leopard; Is a house cleaning in order.

Hello all,

This is more of a python related question rather than an ipython  
question but I hope you won't chastise me for asking it here :-)

I'm starting to learn python on my macbook pro running OS X leopard.  
I've been having problems with ipython (see a previous mail) and have  
many pythons running about on my system. In particular:

1. Apparently I have python that came packaged along with OS X leopard.
2. I've installed some packages using fink that, I believe, also  
installed a python.
3. I've installed "sage" (a symbolic math package akin to Mathematica  
or Maple) which, evidently, comes with a python.
4. I've installed parts of MacPython 2.5 following instructions at: http://wiki.python.org/moin/MacPython/Leopard
5. Upon recommendation form a kind list subscriber, I've installed the  
python2.6 package for OS X found at: http://www.python.org/download/releases/2.6/

Even though I've installed all these packages, when I start python I  
still get python 2.5 (see below)

	Macintosh-4:~ gary$ python
	Python 2.5.2 (r252:60911, Jun  1 2008, 15:00:48)
	[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
	Type "help", "copyright", "credits" or "license" for more information.
	>>> import sys
	>>> print sys.path
	['', '/sw/lib/python25.zip', '/sw/lib/python2.5', '/sw/lib/python2.5/ 
plat-darwin', '/sw/lib/python2.5/plat-mac', 				'/sw/lib/python2.5/ 
plat-mac/lib-scriptpackages', '/sw/lib/python2.5/lib-tk', '/sw/lib/ 
python2.5/lib-dynload',
	'/sw/lib/python2.5/site-packages', '/sw/lib/python2.5/site-packages/ 
Numeric',
	'/sw/lib/python2.5/site-packages/gtk-	2.0']
	>>>

My questions are:

1. How do I get python 2.6 to come up when I enter "python" at the  
terminal command line?
2. Should I "clean house" of all other pythons on the system and if  
so, how is that done?
3. Do these other pythons interfere with each other in some way? Is it  
a problem having all these pythons slithering around on my system?

Thanks for any help you can offer,
Gary

Gary Church
gary.church1 <at> comcast.net
charles reid | 8 Oct 06:45
Picon
Gravatar

Re: A bag of pythons on OS X leopard; Is a house cleaning in order.

Hi Gary -

I've had some mixed success with various Pythons on my system (also running OS X Leopard, 10.5.5).  I ended up using the Mac's system Python, for two reasons:
1) It comes with the Mac for a reason - the system uses this Python for various tasks, and getting rid of it can screw things up
2) I don't have a particular need for 2.5 vs. 2.6, as I'm not really a power-user (I mainly use Python to use iPython with Numpy and Scipy)

I've got a brief writeup on my personal solution here:

http://charles.endoftheinternet.org/index.php?page=mac&sub=python

Basically, I ended up using a few bits from MacPython to supplement the system Python (but not to replace it).  I then used the SciPy superpack (http://macinscience.org/?page_id=6), which is a really handy script for installing iPython with Numpy, Scipy, and Matplotlib.

I don't know what your specific usage of iPython is, but hopefully this info will help you out.  It certainly took me a good chunk of time to get it all worked out.


Charles


==========

Out of damp and gloomy days, out of solitude, out of loveless words directed at us, conclusions grow up in us like fungus: one morning they are there, we know not how, and they gaze upon us, morose and gray. Woe to the thinker who is not the gardener but only the soil of the plants that grow in him.
- Friedrich Nietzsche


On Tue, Oct 7, 2008 at 8:11 PM, Gary Church <gary.church1 <at> comcast.net> wrote:
Hello all,

This is more of a python related question rather than an ipython
question but I hope you won't chastise me for asking it here :-)

I'm starting to learn python on my macbook pro running OS X leopard.
I've been having problems with ipython (see a previous mail) and have
many pythons running about on my system. In particular:

1. Apparently I have python that came packaged along with OS X leopard.
2. I've installed some packages using fink that, I believe, also
installed a python.
3. I've installed "sage" (a symbolic math package akin to Mathematica
or Maple) which, evidently, comes with a python.
4. I've installed parts of MacPython 2.5 following instructions at: http://wiki.python.org/moin/MacPython/Leopard
5. Upon recommendation form a kind list subscriber, I've installed the
python2.6 package for OS X found at: http://www.python.org/download/releases/2.6/

Even though I've installed all these packages, when I start python I
still get python 2.5 (see below)

       Macintosh-4:~ gary$ python
       Python 2.5.2 (r252:60911, Jun  1 2008, 15:00:48)
       [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
       Type "help", "copyright", "credits" or "license" for more information.
       >>> import sys
       >>> print sys.path
       ['', '/sw/lib/python25.zip', '/sw/lib/python2.5', '/sw/lib/python2.5/
plat-darwin', '/sw/lib/python2.5/plat-mac',                             '/sw/lib/python2.5/
plat-mac/lib-scriptpackages', '/sw/lib/python2.5/lib-tk', '/sw/lib/
python2.5/lib-dynload',
       '/sw/lib/python2.5/site-packages', '/sw/lib/python2.5/site-packages/
Numeric',
       '/sw/lib/python2.5/site-packages/gtk-   2.0']
       >>>

My questions are:

1. How do I get python 2.6 to come up when I enter "python" at the
terminal command line?
2. Should I "clean house" of all other pythons on the system and if
so, how is that done?
3. Do these other pythons interfere with each other in some way? Is it
a problem having all these pythons slithering around on my system?

Thanks for any help you can offer,
Gary

Gary Church
gary.church1 <at> comcast.net



_______________________________________________
IPython-user mailing list
IPython-user <at> scipy.org
http://lists.ipython.scipy.org/mailman/listinfo/ipython-user

_______________________________________________
IPython-user mailing list
IPython-user <at> scipy.org
http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
Justin C. Walker | 8 Oct 08:17
Picon
Gravatar

Re: A bag of pythons on OS X leopard; Is a house cleaning in order.


On Oct 7, 2008, at 19:11 , Gary Church wrote:

> This is more of a python related question rather than an ipython
> question but I hope you won't chastise me for asking it here :-)
[snip]
> 1. How do I get python 2.6 to come up when I enter "python" at the
> terminal command line?

The package should tell you something about where it is installed, and  
maybe how to invoke it.  As a start, I would set your PATH variable so  
the path to the python 2.6 program is first:

    export PATH=/path/to/python:$PATH

where the python executable is "/path/to/python/python".

> 2. Should I "clean house" of all other pythons on the system and if
> so, how is that done?

I would minimize the number that you install.  Right now, I just have  
the sage pythons and the system's version.  I have installed MacPython  
in the past (2.3, 2.4, 2.5), but I don't have much left, so there may  
be an easy way to get rid of most of this one (how I got rid of them  
is buried in the dust in my attic :-}).

> 3. Do these other pythons interfere with each other in some way? Is it
> a problem having all these pythons slithering around on my system?

The sage python should not interfere.  Generally, it is built to be  
entirely self-contained.

You can run it using 'sage -python' or 'sage -ipython' (if you have  
'sage' in your PATH) or '$SAGE_ROOT/sage -xxx' (if not).

Your msg shows that you have Fink installed.  Which python version is  
in Fink (if any)?

Command-line use of python will be dictated by your environment; in  
particular, your PATH variable determines which version of python will  
be run, and if you have DYLD_* and LD_* variables in your environment,  
they should be set up to match your PATH variable.

Some problems can arise if you subsequently install packages which  
drop .py's in hard-wired locations.  One way to avoid it, once you  
understand how these variables work, is to set up environments for  
each that point only to the specific python's install points.

Feel free to ask for further clarification.

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
-----------
If it weren't for carbon-14, I wouldn't date at all.
-----------
Robin | 8 Oct 10:01
Picon

Re: A bag of pythons on OS X leopard; Is a house cleaning in order.

Hi,

I am in a similar situation - and generally I don't think you can
avoid having several copies.

I believe from earlier discussions on this list it is very much not
recommended to use the system python for your numpy stuff. This is
because the Apple system python comes with it's own very old version
of numpy. Replacing this might have consequences for other Apple
stuff, and also other third party apps that assume the standard setup.
In general, one shouldn't mess about with anything in /System since
that is part of the standard distribution.

I use MacPorts rather than Fink - but I have the same thing of having
a python installed through that when I installed a python application.
I even have numpy installed through that - again an older version -
that was pulled in as a depenency. I wanted to try and trick the
macports system to accepting my SVN numpy, but again it seems this is
very much not recommended so the dependencies in the macports system
are standard. This is installed in /opt/local/Library/Frameworks with
symlinks for the python executable in /opt/local/bin. I tihnk with
fink the prefix is /sw so this is the version you are picking up at
the moment.

So I have python.org Python installation for my own use. This installs
in /Library/Frameworks with symlinks in /usr/local/bin. I have
setuptools installed in this version, so easy_install installs things
here.

On Wed, Oct 8, 2008 at 3:11 AM, Gary Church <gary.church1 <at> comcast.net> wrote:
> 1. How do I get python 2.6 to come up when I enter "python" at the
> terminal command line?

I think you are picking up the fink python. Type
which python
to be sure.
Changing the path should be enough. The Python.org 2.5 package
installed in /usr/local/bin so I assume the 2.6 does the same. You
need to make sure this comes before /sw/bin in your path.
I think putting
export PATH=/usr/local/bin:$PATH
at the end of your .bashrc will do it. Maybe also put
source ~/.bashrc
in your .bash_profile
(I'm not sure of the correct way - always find the rc/profile
distinction a bit confusing).

> 2. Should I "clean house" of all other pythons on the system and if
> so, how is that done?

I don't think so - I don't think it does any harm to have several and
reduces the chance of  problems with the different components.

> 3. Do these other pythons interfere with each other in some way? Is it
> a problem having all these pythons slithering around on my system?

No - as long as you are always using the one you expect, and other
things are using the one they expect. Fink python apps should look
directly for the Fink version, but not all may, so it's something to
keep in mind.

>
> Thanks for any help you can offer,
> Gary
>
> Gary Church
> gary.church1 <at> comcast.net
>
>
>
> _______________________________________________
> IPython-user mailing list
> IPython-user <at> scipy.org
> http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
>
Barry Wark | 8 Oct 18:55
Picon
Gravatar

Re: A bag of pythons on OS X leopard; Is a house cleaning in order.

On Wed, Oct 8, 2008 at 1:01 AM, Robin <robince <at> gmail.com> wrote:
> Hi,
>
> I am in a similar situation - and generally I don't think you can
> avoid having several copies.
>
> I believe from earlier discussions on this list it is very much not
> recommended to use the system python for your numpy stuff. This is
> because the Apple system python comes with it's own very old version
> of numpy. Replacing this might have consequences for other Apple
> stuff, and also other third party apps that assume the standard setup.
> In general, one shouldn't mess about with anything in /System since
> that is part of the standard distribution.

Not true. The system python, by default, will put its version of numpy
first on the python path (to protect Apple-installed tools that depend
on numpy). The system python comes with setuptools, however, for a
reason. If you use setuptools to install a more recent version of
numpy, setuptools will take care of putting the new version of numpy
first on the python path while allowing Apple-installed tools to
continue to use the version that shipped with Leopard.

So the general rule is: use setuptools and things will "just work".

>
> I use MacPorts rather than Fink - but I have the same thing of having
> a python installed through that when I installed a python application.
> I even have numpy installed through that - again an older version -
> that was pulled in as a depenency. I wanted to try and trick the
> macports system to accepting my SVN numpy, but again it seems this is
> very much not recommended so the dependencies in the macports system
> are standard. This is installed in /opt/local/Library/Frameworks with
> symlinks for the python executable in /opt/local/bin. I tihnk with
> fink the prefix is /sw so this is the version you are picking up at
> the moment.
>
> So I have python.org Python installation for my own use. This installs
> in /Library/Frameworks with symlinks in /usr/local/bin. I have
> setuptools installed in this version, so easy_install installs things
> here.
>
> On Wed, Oct 8, 2008 at 3:11 AM, Gary Church <gary.church1 <at> comcast.net> wrote:
>> 1. How do I get python 2.6 to come up when I enter "python" at the
>> terminal command line?
>
> I think you are picking up the fink python. Type
> which python
> to be sure.
> Changing the path should be enough. The Python.org 2.5 package
> installed in /usr/local/bin so I assume the 2.6 does the same. You
> need to make sure this comes before /sw/bin in your path.
> I think putting
> export PATH=/usr/local/bin:$PATH
> at the end of your .bashrc will do it. Maybe also put
> source ~/.bashrc
> in your .bash_profile
> (I'm not sure of the correct way - always find the rc/profile
> distinction a bit confusing).
>
>> 2. Should I "clean house" of all other pythons on the system and if
>> so, how is that done?
>
> I don't think so - I don't think it does any harm to have several and
> reduces the chance of  problems with the different components.
>
>> 3. Do these other pythons interfere with each other in some way? Is it
>> a problem having all these pythons slithering around on my system?
>
> No - as long as you are always using the one you expect, and other
> things are using the one they expect. Fink python apps should look
> directly for the Fink version, but not all may, so it's something to
> keep in mind.
>
>>
>> Thanks for any help you can offer,
>> Gary
>>
>> Gary Church
>> gary.church1 <at> comcast.net
>>
>>
>>
>> _______________________________________________
>> IPython-user mailing list
>> IPython-user <at> scipy.org
>> http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
>>
> _______________________________________________
> IPython-user mailing list
> IPython-user <at> scipy.org
> http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
>
Barry Wark | 8 Oct 19:06
Picon
Gravatar

Re: ipython problem on OS X leopard: non-responsive "u" key.

Gary,

As a fellow OS X & ipython user, I'm sorry you're struggling with
this. There was a discussion a while back about a similar sounding
issue. My recollection is that it was solved by removing the
~/.ipython directory and starting over. However, it sounds from some
of your other posts that you may not be using the system python that
shipped with Leopard (which uses libedit instead of GNU readline and
has thus been the source of some now hopefully resolved issues). What
do you get if you type "which python" at the command prompt? If it's
the Fink or MacPorts or MacPython python, there may be some issue with
their configuration. Do you have the same problem with any other
python programs (e.g. at the normal python prompt)? You may want to
try the "pythonmac-sig" list for help in that case.

I know you've gotten a lot of conflicting advice about which python
distribution to use. Just for completeness, let me add my 2 cents and
take it as you will: unless you have need for python 2.6 (keeping in
mind that neither IPython nor NumPy/SciPy officially support 2.6 yet),
stick with the system-installed python on Leopard and delete all of
the other distributions. Use setuptools to install packages and there
won't be any conflicts between system tools and your newly installed
packages (you can use distutils as well, but the newly installed
packages will be placed _after_ the system-installed packages on the
python path). This is the Apple-sanctioned and blessed way to do
Python on OS X. As a benefit of using the system python, you gain
Dtrace support in the python interpreter (without applying a patch and
recompiling the python distribution yourself). You can then use
Apple's Instruments application (or dtrace at the command line) to
profile and trace executing python code. It's very cool.

Finally, please keep asking questions on the list. There is a pretty
large community of IPython users on the Mac. Unfortunately I (and I
imagine others) can get pretty bogged down at work and our response
time on the list suffers. Please don't take it personally or as a
criticism of your question. If you have an issue that is also possibly
a bug in IPython (as this may be), please file a bug report at
https://bugs.launchpad.net/ipython/+filebug.

cheers,
Barry

On Tue, Oct 7, 2008 at 6:43 PM, Gary Church <gary.church1 <at> comcast.net> wrote:
> Hello ipython users,
>
> I recently queried the list for help on a particularly annoying
> problem with ipython on OS X leopard. When I start ipython from a
> terminal (I use iterm but have tried in regular term as well)
> everything works fine except for the lower-case "u" key, which is
> unresponsive; nothing happens in iterm and I get a "beep" in term.
>
> A kind list-dweller tried helping with some suggestions but, alas, the
> problem remains. This seems strange to me as all other functionality
> (TAB completion, etc...) is present.
>
> If there are ipython, OS X leopard users on this list that aren't
> having any problems with ipython, maybe you could shed some light on
> my problem? I'm not sure where to start looking for a resolution so
> any suggestions are welcome :-)
>
> Thanks much,
> Gary
>
> Gary Church
> gary.church1 <at> comcast.net
>
>
>
> _______________________________________________
> IPython-user mailing list
> IPython-user <at> scipy.org
> http://lists.ipython.scipy.org/mailman/listinfo/ipython-user
>

Gmane