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

Add support for PyQt4 and PyQt5 by using Qt.py shim #368

Merged
merged 5 commits into from May 10, 2017
Merged

Add support for PyQt4 and PyQt5 by using Qt.py shim #368

merged 5 commits into from May 10, 2017

Conversation

@sdrave
Copy link
Member

@sdrave sdrave commented Apr 27, 2017

No description provided.

@sdrave sdrave added this to the 0.5 milestone Apr 27, 2017
@sdrave sdrave requested a review from renefritze Apr 27, 2017
@sdrave
Copy link
Member Author

@sdrave sdrave commented May 8, 2017

@pymor/pymor-devs, could you check if the gui stuff is still working for you with this PR?

@sdrave sdrave mentioned this pull request May 9, 2017
@ftalbrecht
Copy link
Member

@ftalbrecht ftalbrecht commented May 9, 2017

Executing the following:

virtualenv --system-site-packages -p python3 venv
. venv/bin/activate
git clone https://github.com/pymor/pymor.git
cd pymor
git checkout qt_py
pip install -r requirements.txt
pip install -r requirements-optional.txt
cd src
echo $PWD > "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/pymor.pth"
python setup.py build_ext --inplace
cd pymordemos
./thermalblock_gui.py

gives the following error:

Traceback (most recent call last):
  File "./thermalblock_gui.py", line 46, in <module>
    from Qt import QtWidgets
ModuleNotFoundError: No module named 'Qt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./thermalblock_gui.py", line 48, in <module>
    raise QtMissing()
pymor.core.exceptions.QtMissing: cannot visualize: import of Qt bindings failed

I am obviously missing something...

@renefritze
Copy link
Member

@renefritze renefritze commented May 9, 2017

Works fine for me.

@ftalbrecht
Copy link
Member

@ftalbrecht ftalbrecht commented May 9, 2017

I get the same error without --system-site-packages. pip freeze gives

alabaster==0.7.10
appdirs==1.4.3
Babel==2.4.0
coverage==4.4
cycler==0.10.0
Cython==0.25.2
decorator==4.0.11
docopt==0.6.2
docutils==0.13.1
evtk==1.0.1
imagesize==0.7.1
ipykernel==4.6.1
ipyparallel==6.0.2
ipython==6.0.0
ipython-genutils==0.2.0
jedi==0.10.2
Jinja2==2.9.6
jupyter-client==5.0.1
jupyter-core==4.3.0
MarkupSafe==1.0
matplotlib==2.0.1
mpi4py==2.0.0
numpy==1.12.1
olefile==0.44
packaging==16.8
pexpect==4.2.1
pickleshare==0.7.4
Pillow==4.1.1
prompt-toolkit==1.0.14
ptyprocess==0.5.1
py==1.4.33
pyamg==3.2.1
Pygments==2.2.0
PyOpenGL==3.1.0
pyparsing==2.2.0
pytest==3.0.7
pytest-cov==2.4.0
pytest-runner==2.11.1
python-dateutil==2.6.0
pytz==2017.2
pyzmq==16.0.2
requests==2.13.0
scipy==0.19.0
simplegeneric==0.8.1
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.5.5
tornado==4.5.1
traitlets==4.3.2
wcwidth==0.1.7
@ftalbrecht
Copy link
Member

@ftalbrecht ftalbrecht commented May 9, 2017

Following @sdrave suggestions,

virtualenv -p python3.6 venv
. venv/bin/activate
pip install git+https://github.com/pymor/pymor@qt_py
git clone https://github.com/pymor/pymor.git
cd pymor/src/pymordemos
git checkout qt_py
./thermalblock_gui.py

yields

Traceback (most recent call last):
  File "./thermalblock_gui.py", line 40, in <module>
    import OpenGL
ModuleNotFoundError: No module named 'OpenGL'

pip freeze gives

alabaster==0.7.10
appdirs==1.4.3
Babel==2.4.0
Cython==0.25.2
docopt==0.6.2
docutils==0.13.1
imagesize==0.7.1
Jinja2==2.9.6
MarkupSafe==1.0
numpy==1.12.1
packaging==16.8
Pygments==2.2.0
pymor==0.5.0rc0+479.gd7f10a82
pyparsing==2.2.0
pytz==2017.2
Qt.py==1.0.0b3
requests==2.13.0
scipy==0.19.0
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.5.5
@sdrave
Copy link
Member Author

@sdrave sdrave commented May 10, 2017

Works on @ftalbrecht's machine as well ..

@sdrave sdrave merged commit 7050bcd into master May 10, 2017
2 of 3 checks passed
2 of 3 checks passed
coverage/coveralls Coverage decreased (-0.7%) to 78.74%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@sdrave sdrave deleted the qt_py branch May 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants