Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spyder 2.1.13 does not start with PyQt4 4.10 #1302

Closed
spyder-bot opened this issue Feb 17, 2015 · 25 comments
Closed

Spyder 2.1.13 does not start with PyQt4 4.10 #1302

spyder-bot opened this issue Feb 17, 2015 · 25 comments

Comments

@spyder-bot
Copy link
Collaborator

From toliman....@gmail.com on 2013-03-07T20:09:32Z

Spyder Version: 2.1.13
Python Version: 2.7.3
Qt Version: 4.6.2, PyQt4 (API v2) 4.10 on Linux
IPython: 0.13.1

When starting spyder I get the following error message:

Traceback (most recent call last):
File "/opt/python2.7/bin/spyder", line 2, in
from spyderlib import spyder
File "/opt/python2.7/lib/python2.7/site-packages/spyderlib/spyder.py", line 48, in
requirements.check_qt()
File "/opt/python2.7/lib/python2.7/site-packages/spyderlib/requirements.py", line 51, in check_qt
% (package_name, required_str, actual_str))
File "/opt/python2.7/lib/python2.7/site-packages/spyderlib/requirements.py", line 30, in show_warning
raise RuntimeError, message
RuntimeError: Please check Spyder installation requirements:
PyQt4 4.4+ is required (found v4.10).

When commenting out "Check Qt binding" section in requirements.py, spider starts up
normally. But when I try to start the Ipython plugin , the dockwidget does not start and the internal console reports the same problem:

Traceback (most recent call last):
File "/opt/python2.7/lib/python2.7/site-packages/spyderlib/plugins/externalconsole.py", line 809, in
cf, kernel_widget_id=id(shellwidget)))
File "/opt/python2.7/lib/python2.7/site-packages/spyderlib/plugins/externalconsole.py", line 862, in create_ipython_frontend
self.main.new_ipython_frontend(connection_file, kernel_widget_id)
File "/opt/python2.7/lib/python2.7/site-packages/spyderlib/spyder.py", line 1599, in new_ipython_frontend
from spyderlib.plugins.ipython import IPythonPlugin
File "/opt/python2.7/lib/python2.7/site-packages/spyderlib/plugins/ipython.py", line 14, in
from spyderlib.widgets.ipython import IPythonApp
File "/opt/python2.7/lib/python2.7/site-packages/spyderlib/widgets/ipython.py", line 12, in
from IPython.frontend.qt.kernelmanager import QtKernelManager
File "/opt/python2.7/lib/python2.7/site-packages/IPython/frontend/qt/kernelmanager.py", line 5, in
from IPython.external.qt import QtCore
File "/opt/python2.7/lib/python2.7/site-packages/IPython/external/qt.py", line 53, in
raise ImportError("IPython requires PyQt4 >= 4.7, found %s"%QtCore.PYQT_VERSION_STR)
ImportError: IPython requires PyQt4 >= 4.7, found 4.10

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1302

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-08T01:10:54Z

Status: Duplicate
Mergedinto: 1291

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-08T01:18:17Z

I think I made a mistake, this is related to issue #1291 , but not the same? I also have the same problem on the development branch in combination with PyQt 4.10

Status: New
Mergedinto:

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-08T01:20:39Z

To be more precise, I get the second traceback, since issue #1291 seems to be resolved on the dependency check at startup, but not with the ipython plugin?

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-08T01:44:26Z

This is an Ipython issue, and it seems like they already took care of this issue, see ipython/ipython#2831 and corresponding pull request. Even thought his issue a show stopper there is nothing Spyder can do about it I think...

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-08T02:00:39Z

I can confirm that using ipython from git resolves this issue for me.

@spyder-bot
Copy link
Collaborator Author

From toliman....@gmail.com on 2013-03-08T12:56:26Z

Just installed ipython from github (1.0dev). When starting Spyder now, I do not get the option to open an ipython interpreter or console anymore. The "Interpreters" menu just offers "Open interpreter". ipython works fine from the command line.

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-09T08:18:26Z

I don't know how spyder probes for ipython, but are you sure ipython got installed correctly? I have no idea about the possible pitfalls when installing ipython (on Arch Linux here, and I dully used the iptyhon-git package). Further, I don't know if ipython 1.0dev brakes spyder 2.1.x or not. Are there any tracebacks? You could try to run spyder in debug mode: spyder --debug.

You could try in combination with spyder 2.2beta (I am running spyder 2.2dev), or you can easily run spyder 2.2dev from source with the bootstrap method (no need to install/uninstall any other spyder version, see here: https://code.google.com/p/spyderlib/wiki/NoteForBetaTesters)? What Linux distribution are you using?

@spyder-bot
Copy link
Collaborator Author

From toliman....@gmail.com on 2013-03-09T12:16:14Z

I am using CentOS 6.3. Ipython 1.0.dev starts ok from the command line.
Using spyder --debug does not produce any error messages related to ipython.
The spyder preference panel in section Console, tab External modules however reports in the Ipython section that "IPython >=v0.10 is not installed on this computer".
So it seems spyder does not probe successfully for ipython.

spyder-2.2.0beta3 does not work at all on my system. Attempting to start it (with or without debug option) yields only: Segmentation fault (core dumped)

@spyder-bot
Copy link
Collaborator Author

From toliman....@gmail.com on 2013-03-09T14:00:15Z

I commented out the version checks in spyder for ipython, then I get the all the menu entries. When I try to open a new IPython kernel, I get the error message:
ImportError: No module named zmq.ipkernel
When checking the IPython installation, the whole folder zmq is missing (already on github, compared to IPython v0.13 where it is included).

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-10T03:44:21Z

pyzmq is an optional Ipyhton dependency for the qtconsole (at least, that's how the Arch Linux package states it). Do you have pyzmq installed on your system? As you are saying, I guess Ipython < 1.0 came along with pyzmq, but 1.0 and above doesn't? See also some notes on the Ipython dependency here: http://ipython.org/ipython-doc/dev/install/install.html#dependencies-for-ipython-zmq .

Sorry for not being much of help here...but thanks for trying to get to the bottom if it anyway!

@spyder-bot
Copy link
Collaborator Author

From ghisv...@gmail.com on 2013-03-10T05:51:19Z

I am having the same issue on current Ubuntu Raring snapshot, spyder is at v2.10, IPython at v0.13.1 and PyQt at v4.10. I opened a bug report on launchpad and linked it to this issue.

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-10T06:17:21Z

ghisvail, just to be clear: both bugs are fixed upstream, the important issue for the distributions is to either backport the changes (for spyder: https://code.google.com/p/spyderlib/source/detail?r=2c93f12f1e1b , for Ipython: ipython/ipython@8f74907 ) or to wait until the next releases. For Spyder: v2.2, there already is a stable beta3 or we have to quickly release a 2.14 that contains the fix. I have no idea about Ipython release plans... I guess downgrading pyqt is not on the table. If Ubuntu is still at spyder v2.10 (dates back to May 2012...), somebody should step up to package an updated version.

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-10T08:58:23Z

Toliman, just because I am curious, where can you lookup which package versions are used in which CentOS version? I found this site for Fedora: https://apps.fedoraproject.org/packages/ , but couldn't figure out where CentOS has something similar.

@spyder-bot
Copy link
Collaborator Author

From toliman....@gmail.com on 2013-03-10T11:01:34Z

David:

Regarding pyzmq: Yes, I have it installed, but the problem is that spyder tries to import the package through the IPython hierarchy, the traceback is:

File "/opt/python2.7/lib/python2.7/site-packages/spyderlib/widgets/externalshell/startup.py", line 37, in
from IPython.zmq.ipkernel import IPKernelApp

Regarding stable Spyder v2.2beta3: As I mentioned in #8, that version does not start at all on my system. I reported this in https://code.google.com/p/spyderlib/issues/detail?id=1303 .

Regarding CentOS package lookup:
I do not know whether there is anything similar to the fedora site, but you can find the CentOS 6.3 packages in: http://mirror.centos.org/centos/6.3/os/x86_64/Packages/ They also have similar directories for older supported releases.
Or you can try: http://pkgs.org/

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-10T11:32:13Z

I've just checked my IPython from git package, and it does contain the zmq module (on Arch Linux, this is: /usr/lib/python2.7/site-packages/IPython/kernel/zmq/). How it is installed from the git sources goes as follows:
python2 setup.py install --optimize=1 (or see here for the Arch Linux package build script https://aur.archlinux.org/packages/ip/ipython-git/PKGBUILD )

Is it be possible something went wrong with your IPython installation? If I check the IPython sources on github, it still includes zqm though: https://github.com/ipython/ipython/tree/master/IPython/kernel/zmq (github master), and here for the 0.13 tree: https://github.com/ipython/ipython/tree/0.13.x/IPython/zmq

@spyder-bot
Copy link
Collaborator Author

From toliman....@gmail.com on 2013-03-10T12:10:45Z

I downloaded the IPython package as zip from https://github.com/ipython/ipython with branch "master" selected, unzipped it and installed it using "python2 setup.py install". So I do not know that could be wrong there.

If you look at the links you quoted, in the 0.13.x tree the zmq directory is a sub-directory of IPython whereas in the master tree it is a sub-directory of kernel, therefore I would expect the command "from IPython.zmq.ipkernel import IPKernelApp" to fail.

I tried to modify the import statement to "from IPython.kernel.zmq.ipkernel import IPKernelApp" but that does not work either, because the class IPKernelApp is no longer defined in ipkernel.py. https://github.com/ipython/ipython/blob/0.13.x/IPython/zmq/ipkernel.py shows the class IPKernelApp definition starting line 803. https://github.com/ipython/ipython/blob/master/IPython/kernel/zmq/ipkernel.py ends at line 791, and does not have the class class IPKernelApp defined anywhere else in the file as far as I can see.

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-10T12:49:57Z

I am still not being useful :-) ... let me try to recap the problem and maybe we could get the attention of one of the developers (I am just trying to help out a bit, not a dev here)

Some less ideal temporary options:

  • You could fall back to spyder 2.1.13 and IPython 0.13.1 and backport the version checks yourself. I would assume there will be a Spyder version 2.1.14 soon with correct version checking. No idea if/when the IPython devs would release a 0.13.2 bugfix release.
  • fall-back to PyQt 4.9 / Spyder 2.1.13 / IPython 0.13.1

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-10T12:56:46Z

Just checked the IPython mailing list, and they are going to release a 0.13.2 version (no time frame mentioned), and the version checking bug has been backported: https://github.com/ipython/ipython/issues?labels=backport-0.13.2&state=closed http://mail.scipy.org/pipermail/ipython-dev/2013-March/011208.html So in theory, and as far as I can grasp the problem, I would assume IPython 0.13.2 and Spyder 2.1.14 would solve your problem when released...

@spyder-bot
Copy link
Collaborator Author

From toliman....@gmail.com on 2013-03-10T13:58:55Z

David, thanks for trying to help! It helps me to narrow the cause down. The only problem: Everytime I fix something, something else breaks ...

Let me add to your problem summary:

  • Changing IPython.zmq.ipkernel import IPKernelApp" to "from IPython.kernel.zmq.kernelapp import IPKernelApp" allows me to start a new kernel without error messages in the internal console, but shortly thereafter spyder crashes with a segmentation fault. I guess that happens when it tries to open the python front-end for the kernel.
    • I already tried PyQt 4.9 a couple of days ago, but spyder crashed when trying to open a new python kernel (actually it shows the same behavior as described above).

I have not tried to backport the IPython version checking fixes.
Maybe I will just wait for IPython 0.13.2, and in the meantime keep using Spyder with IPython 0.10 (which comes with Centos 6.3).

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-10T14:06:13Z

a few hours ago, the version checking bug in IPython got backported on the 0.13.x branch: https://github.com/ipython/ipython/commits/0.13.x (issue #2831)
You could checkout the 0.13 branch and try to install it from source.

@spyder-bot
Copy link
Collaborator Author

From david.ve...@gmail.com on 2013-03-11T08:15:14Z

FYI, Spyder 2.1.13.1 has been released and fixes issue #1291 . One down (Spyder), one to go (IPython)

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2013-03-11T09:36:26Z

Let's close this issue now that v2.1.13.1 fixes the Spyder related bug.

Regarding IPython, there's not much we can do now that the IPython development team has take action on this.

Status: Fixed

@spyder-bot
Copy link
Collaborator Author

From techtonik@gmail.com on 2013-06-06T14:31:11Z

Status: Duplicate
Mergedinto: 1291

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2013-07-08T08:41:27Z

issue #1482 has been merged into this issue.

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2013-07-09T01:44:45Z

issue #1482 has been merged into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant