Skip to content

WinPython Control Panel crashes after replacing PyQt5 with PyQt4 #483

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

Closed
hiccup7 opened this issue Feb 5, 2017 · 6 comments · Fixed by #487
Closed

WinPython Control Panel crashes after replacing PyQt5 with PyQt4 #483

hiccup7 opened this issue Feb 5, 2017 · 6 comments · Fixed by #487

Comments

@hiccup7
Copy link

hiccup7 commented Feb 5, 2017

Using 64-bit WinPython 3.5.3.0Qt5 on Win8.1, I did the following:

  1. Download from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4
  2. Copy file to D:\toto\PyQt4‑4.11.4‑cp35‑none‑win_amd64.whl
  3. Run "WinPython Command Prompt.exe" as administrator
  4. In the cmd.exe window, type >wppm -u PyQt5
  5. In the cmd.exe window, type >wppm -i D:\toto\PyQt4‑4.11.4‑cp35‑none‑win_amd64.whl
  6. Run WinPython Control Panel with elevated privileges

The result is that WinPython Control Panel process terminates. I worked around the problem by deleting the folder "%WINPYDIR%\Lib\site-packages\PyQt5".

Perhaps the problem occurs because PyQt5 is in the path before PyQt4, and uninstalling PyQt5 leaves a DLL. How about changing env.bat to use different paths for the PyQt5 and PyQt4 cases?

By the way, I am using PyQt4 because I continue to have this problem: matplotlib/matplotlib#7688
I would have re-opened this issue: #449
But the WinPython project does not allow users to do this.

@stonebig stonebig added the bug label Feb 5, 2017
@stonebig stonebig added this to the 2017-01 Pandas-0.20 / Jupyterlab / Edward milestone Feb 5, 2017
@stonebig
Copy link
Contributor

stonebig commented Feb 5, 2017

It should work, and indeed it doesn't ... inquiring what I did wrong (again).
...
well, the test https://github.com/winpython/winpython/blob/master/winpython/qt/__init__.py#L14..L14 doesn't fail after uninstall of PyQt5: I must write it differently.

For example:

    from PyQt5.QtCore import PYQT_VERSION_STR as __version__ #  are_you_here = __import__('PyQt5')

@stonebig
Copy link
Contributor

stonebig commented Feb 5, 2017

a longer term solution would be to rely on QtPy, or have WPPM not relying on Qt packages.
I should have checked that my previous fix was sufficient, and it was not, for WPPM. sorry.

@hiccup7
Copy link
Author

hiccup7 commented Feb 6, 2017

The most important thing to me is that WinPython continues to support replacing PyQt5 with PyQt4. The WinPython 3.5.3.0Qt5 issue I found isn't causing me a real problem because I have a work-around. No hard feelings...

I did some more testing today with Spyder+matplotlib+PyQt5, and I posted the results at matplotlib/matplotlib#7688

@stonebig
Copy link
Contributor

stonebig commented Feb 6, 2017

WinPython shall support PyQt4, or diversity, as PySide2 should become an option, sometime next year.

@hiccup7
Copy link
Author

hiccup7 commented Feb 6, 2017

I customize the batch file for starting Spyder in each WinPython installation folder. Where WinPython has PyQt4 installed, I have "set QT_API=pyqt". Where WinPython has PyQt5 installed, I have "set QT_API=pyqt5".

@stonebig
Copy link
Contributor

stonebig commented Feb 8, 2017

The default test I do is the "generic" one everybody does... So I'll tweak it as written before, but the true solution is to stop patching PyQt5.

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

Successfully merging a pull request may close this issue.

2 participants