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

Can not open soapy GUI #74

Open
ghost opened this issue Jun 5, 2017 · 2 comments
Open

Can not open soapy GUI #74

ghost opened this issue Jun 5, 2017 · 2 comments
Labels
Stale No activity has happened in a significant length of time and the item will be closed.

Comments

@ghost
Copy link

ghost commented Jun 5, 2017

Dear Sir,

I am starting to use the soapy library. I have installed the 'master' branch and I can run the 'python testSimulation.py' without problems, but I am having problems to start the GUI. The problem is on this line of the bin/soapy script:

from soapy import gui

I am using ubuntu 16.04 64-bit, but I have tried also the 32-bit version with the same result. It seems there is a problem with the QT library and Ipython, but I have not been able to find a solution.

Here is the traceback:

Traceback (most recent call last):
  File "/usr/local/bin/soapy", line 4, in <module>
    __import__('pkg_resources').run_script('soapy===v0.13.1-2-gd1d68a0', 'soapy')
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 719, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1504, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/soapy-v0.13.1_2_gd1d68a0-py2.7.egg/EGG-INFO/scripts/soapy", line 12, in <module>
    from soapy import gui
  File "/usr/local/lib/python2.7/dist-packages/soapy-v0.13.1_2_gd1d68a0-py2.7.egg/soapy/gui.py", line 40, in <module>
    from IPython.qt.console.rich_ipython_widget import RichIPythonWidget
  File "/home/user/.local/lib/python2.7/site-packages/IPython/qt/console/rich_ipython_widget.py", line 8, in <module>
    from IPython.external.qt import QtCore, QtGui
  File "/home/user/.local/lib/python2.7/site-packages/IPython/external/qt.py", line 23, in <module>
    QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts)
  File "/home/user/.local/lib/python2.7/site-packages/IPython/external/qt_loaders.py", line 296, in load_qt
    api_options))
ImportError: 
    Could not load requested Qt binding. Please ensure that
    PyQt4 >= 4.7, PyQt5 or PySide >= 1.0.3 is available,
    and only one is imported per session.

    Currently-imported Qt library:   'pyqtv1'
    PyQt4 installed:                 True
    PyQt5 installed:                 False
    PySide >= 1.0.3 installed:       False
    Tried to load:                   ['pyside', 'pyqt', 'pyqt5']
    
@andrewpaulreeves
Copy link
Collaborator

Hi!

Great to hear your giving Soapy a go - apologies that you've been experiencing problems with the GUI.

I think the issue is due to the confusing nature of Qt when using PyQt4 and Python2. There are couple number of different Qt bindings, and the most used, PyQt4, actually has 2 API versions. When using Python 2, APIv1 is used by default, which the IPython console doesn't like. I think I've fixed this now by explicitly setting the API to v2 - I'm about to emerge this fix into master. Hopefully everything will work ok now, I've found that anaconda python is a bit more reliable than packaged python environments as it is a bit more up to date and repeatable across platforms. I'm also slowly switching my main development to be on Python3, though still targeting 2 as well, so if it fits in with your other Python work, you may find 3 a nicer experience.

@andrewpaulreeves
Copy link
Collaborator

HI @user8905 - Just wondering if you've had a chance to test the fix for the GUI from last week? Thanks!
Andrew

@matthewtownson matthewtownson added computePerformance Stale No activity has happened in a significant length of time and the item will be closed. and removed computePerformance labels Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale No activity has happened in a significant length of time and the item will be closed.
Projects
None yet
Development

No branches or pull requests

2 participants