How does one uses IPython plugin for Spyder?

549 views
Skip to first unread message

Boris Gorelik

unread,
Dec 19, 2011, 5:15:03 AM12/19/11
to spyd...@googlegroups.com
So I have successfully started the IPython kernel by using the "Start
new IPython kernel" command. This blog post
http://spyder-ide.blogspot.com/2011/08/preview-of-new-ipython-plugin-for.html
says that an IPython frontend dockwidget is supposed to be created
automatically, but it doesn't. What am I doing wrong?


PS this screenshot shows my setup:
http://imageshack.us/photo/my-images/526/screenshotcj.png/

Boris Gorelik

unread,
Dec 19, 2011, 7:23:29 AM12/19/11
to spyd...@googlegroups.com
I don't know whether this is connected, but it seems that Spyder uses
IPython that is different from the one installed on my system. As you
can see from the screenshot below, I have the newly released 0.12
version of IPython, while Spyder sees 0.12rc. My computer has been
restarted several times since the last IPython upgrade

http://imageshack.us/photo/my-images/4/screenshoted.png/

Carlos Córdoba

unread,
Dec 19, 2011, 9:21:07 AM12/19/11
to spyd...@googlegroups.com
Boris, this is probably due to the fact that Spyder is using a different
python interpreter than your main one. You can see what interpreter is
used in:

Tools > Preferences > Console > Advanced Settings > Python executable

HTH,
Carlos

El 19/12/11 07:23, Boris Gorelik escribió:

bgbg.bg

unread,
Dec 20, 2011, 12:14:45 AM12/20/11
to spyd...@googlegroups.com
No,  I have only one Python interpreter and I verified that it is the one that is specified in  Tools > Preferences > Console > Advanced Settings > Python executable 

I have also noticed that the script in "PYTHONSTARTUP" replacement has no effect on the opened consoles, which is too, very strange.

2011/12/19 Carlos Córdoba <ccord...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.


bgbg.bg

unread,
Dec 20, 2011, 12:52:00 AM12/20/11
to spyd...@googlegroups.com
I need to clarify that the PYTHONSTARTUP variable is ignored only when opening IPython console, not the regular Python console

Serge A. Salamanka

unread,
Jan 18, 2012, 12:32:51 PM1/18/12
to spyd...@googlegroups.com
so far ...
did anyone manage to utilize the features of ipython 0.12 in Spyder ?

#Serge

matt

unread,
Jan 18, 2012, 1:09:05 PM1/18/12
to spyder
I am using the Qtconsole plugin inside Spyder for .12 and .13dev, it
looks pretty good. The inline plots are snazzy.

bgbg.bg

unread,
Jan 19, 2012, 7:19:49 AM1/19/12
to spyd...@googlegroups.com
Did this work for you out-of-box? I have Spyder 2.1.7 and Ipython 0.12 on WinXP and still can't make it work

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.

Jed Ludlow

unread,
Jan 19, 2012, 8:13:28 AM1/19/12
to spyd...@googlegroups.com
On Thursday, January 19, 2012 5:19:49 AM UTC-7, bgbg.bg wrote:
Did this work for you out-of-box? I have Spyder 2.1.7 and Ipython 0.12 on WinXP and still can't make it work

On Wed, Jan 18, 2012 at 8:09 PM, matt <wmatta...@gmail.com> wrote:
I am using the Qtconsole plugin inside Spyder for .12 and .13dev, it
looks pretty good.  The inline plots are snazzy.


I've been experimenting with it a little, and here's my experience so far using Python 2.7.2, Spyder 2.1.7, IPython 0.12 on Windows 7.

Under PyQt4 4.8.5:
I can successfully launch an IPython *interpreter* using the menu command "Interpreters...Open IPython interpreter", but of course this produces the standard warning in the IPython interpreter itself, saying "Warning: Spyder does not support GUI interactions with IPython >=v0.11
on Windows platforms (only IPython v0.10 is fully supported)." This is functioning as designed at the moment, so no concerns here. I can launch a new IPython *kernel* using the menu command "Interpreters...Start a new IPython kernel". The kernel itself appears to start, but the associated frontend plugin fails to launch. I get a traceback in Spyder's internal console that ends with "ValueError: API 'QString' has already been set to version 1".

Under PySide 1.1.0:
IPython *interpreter* launch produces the same results as with PyQt4. IPython *kernel* launch is successful, and the frontend plugin is also successful. Everything works fine, inline plotting works, etc.

I think Issue 805 is tracking this problem:

http://code.google.com/p/spyderlib/issues/detail?id=805

matt

unread,
Jan 19, 2012, 8:54:07 AM1/19/12
to spyd...@googlegroups.com
My experience is very similar to Jed's.  However, I am tracking the development version of IPython so I had to change some version checks in Spyder so it will let me start a kernel.  I also am using the newest version of Spyder off the repository if that might matter.  The code I changed to use IPython .13dev is in my clone http://code.google.com/r/wmattanderson-test/source/checkout.  There's no real change, only allowing what works for .12 to work for .13.

Serge A. Salamanka

unread,
Jan 19, 2012, 9:50:13 AM1/19/12
to spyd...@googlegroups.com
Same problem with QString beeing set up to value 1

Spyder 2.1.7
Python 2.6.5
IPython 0.12
PyQt4 4.7.2

no front end in spyder when creating kernel

Issue 805

#Serge

Matt Anderson

unread,
Mar 7, 2012, 11:36:32 AM3/7/12
to spyd...@googlegroups.com
I can only get it to work with PySide.

--
You received this message because you are subscribed to the Google Groups "spyder" group.

Philipp Lies

unread,
Mar 7, 2012, 11:43:28 AM3/7/12
to spyd...@googlegroups.com
How?
When I switch to PySide all I get is

TypeError: QWidget.setFocusPolicy(Qt.FocusPolicy): argument 1 has
unexpected type 'PySide.QtCore.Qt.FocusPolicy'


On 03/07/2012 05:36 PM, Matt Anderson wrote:
> I can only get it to work with PySide.
>
> On Thu, Jan 19, 2012 at 8:50 AM, Serge A. Salamanka <sals...@tut.by
> <mailto:sals...@tut.by>> wrote:
>
> Same problem with QString beeing set up to value 1
>
> Spyder 2.1.7
> Python 2.6.5
> IPython 0.12
> PyQt4 4.7.2
>
> no front end in spyder when creating kernel
>
> Issue 805
>
> #Serge
>
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To post to this group, send email to spyd...@googlegroups.com

> <mailto:spyd...@googlegroups.com>.


> To unsubscribe from this group, send email to
> spyderlib+...@googlegroups.com

> <mailto:spyderlib%2Bunsu...@googlegroups.com>.

Matt Anderson

unread,
Mar 7, 2012, 12:14:39 PM3/7/12
to spyd...@googlegroups.com
Strange, I've never seen that one...I am running Qt 4.7.4 via PySide 1.0.9
and also Ipython .13dev which should not matter.  If getting the same version of PySide doesn't fix the problem and you want to change to try Ipython .13dev you will have to change the spyder code a bit.  I did it on my clone, and it should be up to date...let me know how it goes

Matt Anderson

unread,
Mar 7, 2012, 1:28:54 PM3/7/12
to spyd...@googlegroups.com

I will upgrade in a little bit and check it out

On Mar 7, 2012 11:59 AM, "Philipp Lies" <philip...@googlemail.com> wrote:
I am running Qt 4.7.4 via PySide 1.1.0 on Ubuntu 11.10, but
unfortunately I cannot downgrade to 1.0.9 to see if it works.


On 03/07/2012 06:14 PM, Matt Anderson wrote:
> Strange, I've never seen that one...I am running Qt 4.7.4 via PySide 1.0.9
> and also Ipython .13dev which should not matter.  If getting the same
> version of PySide doesn't fix the problem and you want to change to try
> Ipython .13dev you will have to change the spyder code a bit.  I did it
> on my clone, and it should be up to date...let me know how it goes
> https://WMattA...@code.google.com/r/wmattanderson-test/

>
>
> On Wed, Mar 7, 2012 at 10:43 AM, Philipp Lies
> <philip...@googlemail.com <mailto:philip...@googlemail.com>> wrote:
>
>     How?
>     When I switch to PySide all I get is
>
>     TypeError: QWidget.setFocusPolicy(Qt.FocusPolicy): argument 1 has
>     unexpected type 'PySide.QtCore.Qt.FocusPolicy'
>
>
>     On 03/07/2012 05:36 PM, Matt Anderson wrote:
>     > I can only get it to work with PySide.
>     >
>     > On Thu, Jan 19, 2012 at 8:50 AM, Serge A. Salamanka
>     <sals...@tut.by <mailto:sals...@tut.by>
>     > <mailto:sals...@tut.by <mailto:sals...@tut.by>>> wrote:
>     >
>     >     Same problem with QString beeing set up to value 1
>     >
>     >     Spyder 2.1.7
>     >     Python 2.6.5
>     >     IPython 0.12
>     >     PyQt4 4.7.2
>     >
>     >     no front end in spyder when creating kernel
>     >
>     >     Issue 805
>     >
>     >     #Serge
>     >
>     >     --
>     >     You received this message because you are subscribed to the Google
>     >     Groups "spyder" group.
>     >     To post to this group, send email to
>     spyd...@googlegroups.com <mailto:spyd...@googlegroups.com>
>     >     <mailto:spyd...@googlegroups.com

>     <mailto:spyd...@googlegroups.com>>.
>     >     To unsubscribe from this group, send email to
>     >     spyderlib+...@googlegroups.com
>     <mailto:spyderlib%2Bunsu...@googlegroups.com>

Philipp Lies

unread,
Mar 7, 2012, 12:59:43 PM3/7/12
to spyd...@googlegroups.com
I am running Qt 4.7.4 via PySide 1.1.0 on Ubuntu 11.10, but
unfortunately I cannot downgrade to 1.0.9 to see if it works.

On 03/07/2012 06:14 PM, Matt Anderson wrote:

> Strange, I've never seen that one...I am running Qt 4.7.4 via PySide 1.0.9
> and also Ipython .13dev which should not matter. If getting the same
> version of PySide doesn't fix the problem and you want to change to try
> Ipython .13dev you will have to change the spyder code a bit. I did it
> on my clone, and it should be up to date...let me know how it goes
> https://WMattA...@code.google.com/r/wmattanderson-test/

> <http://code.google.com/r/wmattanderson-test/source/checkout>

>
>
> On Wed, Mar 7, 2012 at 10:43 AM, Philipp Lies
> <philip...@googlemail.com <mailto:philip...@googlemail.com>> wrote:
>
> How?
> When I switch to PySide all I get is
>
> TypeError: QWidget.setFocusPolicy(Qt.FocusPolicy): argument 1 has
> unexpected type 'PySide.QtCore.Qt.FocusPolicy'
>
>
> On 03/07/2012 05:36 PM, Matt Anderson wrote:
> > I can only get it to work with PySide.
> >
> > On Thu, Jan 19, 2012 at 8:50 AM, Serge A. Salamanka
> <sals...@tut.by <mailto:sals...@tut.by>

> > <mailto:sals...@tut.by <mailto:sals...@tut.by>>> wrote:
> >
> > Same problem with QString beeing set up to value 1
> >
> > Spyder 2.1.7
> > Python 2.6.5
> > IPython 0.12
> > PyQt4 4.7.2
> >
> > no front end in spyder when creating kernel
> >
> > Issue 805
> >
> > #Serge
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "spyder" group.
> > To post to this group, send email to
> spyd...@googlegroups.com <mailto:spyd...@googlegroups.com>

> > <mailto:spyd...@googlegroups.com


> <mailto:spyd...@googlegroups.com>>.
> > To unsubscribe from this group, send email to
> > spyderlib+...@googlegroups.com
> <mailto:spyderlib%2Bunsu...@googlegroups.com>

> > <mailto:spyderlib%2Bunsu...@googlegroups.com
> <mailto:spyderlib%252Buns...@googlegroups.com>>.

Matt Anderson

unread,
Mar 7, 2012, 3:48:14 PM3/7/12
to spyd...@googlegroups.com
Nope, mine still works with 1.1.0

I'm on a 64 bit windows 7 box...but I would think that would make mine less likely to work easily.  I'm running mine from source from the bootstrap.py file.

How do you switch back to PyQt, since I have installed PySide I haven't tried?

Philipp Lies

unread,
Mar 7, 2012, 6:44:58 PM3/7/12
to spyd...@googlegroups.com
Well, on Windows I use ipython 0.10 because 0.12 doesn't work at all. PySide doesn't work for me on Windows, I get
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\startup.py", line 87, in <module>
__ipythonshell__ = IPython.Shell.start()
File "C:\Python27\lib\site-packages\IPython\Shell.py", line 1241, in start
return shell(user_ns = user_ns)
File "C:\Python27\lib\site-packages\IPython\Shell.py", line 1146, in __init__
shell_class=MatplotlibMTShell)
File "C:\Python27\lib\site-packages\IPython\Shell.py", line 1045, in __init__
on_kill=[QtGui.qApp.exit])
File "C:\Python27\lib\site-packages\IPython\ipmaker.py", line 100, in make_IPython
embedded=embedded,**kw)
File "C:\Python27\lib\site-packages\IPython\Shell.py", line 636, in __init__
user_ns,user_global_ns,b2 = self._matplotlib_config(name,user_ns,user_global_ns)
File "C:\Python27\lib\site-packages\IPython\Shell.py", line 556, in _matplotlib_config
import matplotlib.pylab as pylab
File "C:\Python27\lib\site-packages\matplotlib\pylab.py", line 264, in <module>
from matplotlib.pyplot import *
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 95, in <module>
new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "C:\Python27\lib\site-packages\matplotlib\backends\__init__.py", line 25, in pylab_setup
globals(),locals(),[backend_name])
File "C:\Python27\lib\site-packages\matplotlib\backends\backend_qt4agg.py", line 12, in <module>
from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
File "C:\Python27\lib\site-packages\matplotlib\backends\backend_qt4.py", line 23, in <module>
from qt4_compat import QtCore, QtGui, _getSaveFileName, __version__
File "C:\Python27\lib\site-packages\matplotlib\backends\qt4_compat.py", line 80, in <module>
from PySide import QtCore, QtGui, __version__, __version_info__
ImportError: DLL load failed: The specified procedure could not be found.

even though I set the PATH to point to PySide not PyQt. On Linux I just change the API selection in the Preferences to switch between PySide and PyQT which seems to work I guess.

On 07.03.2012 21:48, Matt Anderson wrote:
> Nope, mine still works with 1.1.0
>
> I'm on a 64 bit windows 7 box...but I would think that would make mine less likely to work easily. I'm running mine from source from the bootstrap.py file.
>
> How do you switch back to PyQt, since I have installed PySide I haven't tried?
>
>
> On Wed, Mar 7, 2012 at 12:28 PM, Matt Anderson <ma...@archangel.com <mailto:ma...@archangel.com>> wrote:
>
> I will upgrade in a little bit and check it out
>

> On Mar 7, 2012 11:59 AM, "Philipp Lies" <philip...@googlemail.com <mailto:philip...@googlemail.com>> wrote:
>
> I am running Qt 4.7.4 via PySide 1.1.0 on Ubuntu 11.10, but
> unfortunately I cannot downgrade to 1.0.9 to see if it works.
>
> On 03/07/2012 06:14 PM, Matt Anderson wrote:
> > Strange, I've never seen that one...I am running Qt 4.7.4 via PySide 1.0.9
> > and also Ipython .13dev which should not matter. If getting the same
> > version of PySide doesn't fix the problem and you want to change to try
> > Ipython .13dev you will have to change the spyder code a bit. I did it
> > on my clone, and it should be up to date...let me know how it goes
> > https://WMattA...@code.google.com/r/wmattanderson-test/
> > <http://code.google.com/r/wmattanderson-test/source/checkout>
> >
> >
> > On Wed, Mar 7, 2012 at 10:43 AM, Philipp Lies
> > <philip...@googlemail.com <mailto:philip...@googlemail.com> <mailto:philip...@googlemail.com <mailto:philip...@googlemail.com>>> wrote:
> >
> > How?
> > When I switch to PySide all I get is
> >
> > TypeError: QWidget.setFocusPolicy(Qt.FocusPolicy): argument 1 has
> > unexpected type 'PySide.QtCore.Qt.FocusPolicy'
> >
> >
> > On 03/07/2012 05:36 PM, Matt Anderson wrote:
> > > I can only get it to work with PySide.
> > >
> > > On Thu, Jan 19, 2012 at 8:50 AM, Serge A. Salamanka
> > <sals...@tut.by <mailto:sals...@tut.by> <mailto:sals...@tut.by <mailto:sals...@tut.by>>

> > > <mailto:sals...@tut.by <mailto:sals...@tut.by> <mailto:sals...@tut.by <mailto:sals...@tut.by>>>> wrote:
> > >
> > > Same problem with QString beeing set up to value 1
> > >
> > > Spyder 2.1.7
> > > Python 2.6.5
> > > IPython 0.12
> > > PyQt4 4.7.2
> > >
> > > no front end in spyder when creating kernel
> > >
> > > Issue 805
> > >
> > > #Serge
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "spyder" group.
> > > To post to this group, send email to
> > spyd...@googlegroups.com <mailto:spyd...@googlegroups.com> <mailto:spyd...@googlegroups.com <mailto:spyd...@googlegroups.com>>
> > > <mailto:spyd...@googlegroups.com <mailto:spyd...@googlegroups.com>

> > <mailto:spyd...@googlegroups.com <mailto:spyd...@googlegroups.com>>>.

> > > <mailto:spyderlib%2Bunsu...@googlegroups.com <mailto:spyderlib%252Buns...@googlegroups.com>
> > <mailto:spyderlib%252Buns...@googlegroups.com <mailto:spyderlib%25252Bun...@googlegroups.com>>>.

Matt Anderson

unread,
Mar 7, 2012, 8:58:42 PM3/7/12
to spyd...@googlegroups.com
That may be a bit beyond my depth...especially since I can't recreate the issues myself.  About all the advice I would have for you would be to use this website to get things working on Windows.   http://www.lfd.uci.edu/~gohlke/pythonlibs/ 
Reply all
Reply to author
Forward
0 new messages