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 is not installing the PyQt5 wheel when using pip #3242

Closed
techtonik opened this issue Jun 21, 2016 · 9 comments
Closed

Spyder is not installing the PyQt5 wheel when using pip #3242

techtonik opened this issue Jun 21, 2016 · 9 comments

Comments

@techtonik
Copy link
Contributor

Description of your problem

There are two problems.

  1. spyder.exe "doesn't work"
  2. spyder.exe doesn't show anything and doesn't respond to options

What steps will reproduce the problem?

  1. virtualenv v
  2. v\Scripts\pip install --pre -U spyder
  3. v\Scripts\spyder -h

What is the expected output? What do you see instead?

Expected to see help, but nothing happens at all.

Please provide any additional information below

Versions and main components

  • Spyder Version: 3.0.0b3
  • Python Version: 2.7.11
  • Operating system: Vista 32-bit

Dependencies

Doesn't start to get those. pip freeze

alabaster==0.7.8
astroid==1.4.6
Babel==2.3.4
backports-abc==0.4
backports.shutil-get-terminal-size==1.0.0
backports.ssl-match-hostname==3.5.0.1
certifi==2016.2.28
colorama==0.3.7
configparser==3.5.0
decorator==4.0.10
docutils==0.12
entrypoints==0.2.2
functools32==3.2.3.post2
imagesize==0.7.1
ipykernel==4.3.1
ipython==5.0.0b4
ipython-genutils==0.1.0
jedi==0.9.0
Jinja2==2.8
jsonschema==2.5.1
jupyter-client==4.3.0
jupyter-core==4.1.0
lazy-object-proxy==1.2.2
MarkupSafe==0.23
mistune==0.7.2
nbconvert==4.2.0
nbformat==4.0.1
pathlib2==2.1.0
pep8==1.7.0
pickleshare==0.7.2
prompt-toolkit==1.0.3
psutil==4.3.0
pyflakes==1.2.3
Pygments==2.1.3
pylint==1.5.6
pytz==2016.4
pyzmq==15.2.0
QtAwesome==0.3.3
qtconsole==4.2.1
QtPy==1.0.2
rope==0.10.3
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.4.4
spyder==3.0.0b3
tornado==4.3
traitlets==4.2.1
wcwidth==0.1.6
win-unicode-console==0.4
wrapt==1.10.8
zmq==0.0.0
@Nodd
Copy link
Contributor

Nodd commented Jun 21, 2016

I see that you don't have PyQt nor PySide installed, maybe that's the reason why ? It should throw an exception however.

@techtonik
Copy link
Contributor Author

@Nodd yes, the absence of Qt binding is most likely the reason, but I expect it to react to command line options or show exception.

@techtonik
Copy link
Contributor Author

techtonik commented Jun 21, 2016

Seems to be an issue with setuptools launcher https://bitbucket.org/vinay.sajip/simple_launcher/issues/2/launcher-ignores-command-line-arguments

In the meanwhile I was able to get stacktrace about missing bindings with spyder 2> 1. pip is only able to install PySide 1.2.4, so after installing it now complains about missing key:

  File "v\lib\site-packages\spyderlib\app\spyder.py", line 48, in <module>
    requirements.check_qt()
  File "v\lib\site-packages\spyderlib\requirements.py", line 41, in check_qt
    package_name, required_ver = qt_infos[qtpy.API]
KeyError: 'pyside'

@techtonik
Copy link
Contributor Author

I fixed PySide error with the patch below, but it crashes as soon as I click Preferences.

diff --git a/spyderlib/requirements.py b/spyderlib/requirements.py
index d48b56d..c81ecb1 100644
--- a/spyderlib/requirements.py
+++ b/spyderlib/requirements.py
@@ -35,7 +35,7 @@ def check_path():

 def check_qt():
     """Check Qt binding requirements"""
-    qt_infos = dict(pyqt5=("PyQt5", "5.2"), pyqt=("PyQt4", "4.6"))
+    qt_infos = dict(pyqt5=("PyQt5", "5.2"), pyqt=("PyQt4", "4.6"), pyside=("PySide", "1.2.4"))
     try:
         import qtpy
         package_name, required_ver = qt_infos[qtpy.API]

Need to find out the way to install PyQt4 into virtualenv.

@Nodd
Copy link
Contributor

Nodd commented Jun 21, 2016

The problem with PySide and peferences is reported in #2567.

I think we'd accept a PR with your modifications to run with pyside. @ccordoba12 ?

@ccordoba12 ccordoba12 changed the title pip install in virtualenv doesn't work with 3.0.0b3 Spyder is not installing PyQt5 wheel Jun 21, 2016
@ccordoba12
Copy link
Member

ccordoba12 commented Jun 21, 2016

We could make our wheel to install the PyQt5 one, although it's semi-broken on Linux and Windows (WebEngine is not working), and it's only available for Python 3.5.

@stonebig, would you be ok with that?


About PySide: I won't reactivate support for it until I see a fully committed effort to fix all its bugs. So far I've only seen good intentions :-)

@ccordoba12 ccordoba12 changed the title Spyder is not installing PyQt5 wheel Spyder is not installing the PyQt5 wheel when using pip Jun 21, 2016
@stonebig
Copy link
Contributor

stonebig commented Jun 21, 2016

hi @ccordoba12

I'm not sure of what you mean, but in any solution that would make Spyder/Webengine/PyQt5/Python3.5/Windows combination work is welcomed.

Otherwise, I will hope for a miracle with PyQt5.6.1

Detkev of "Eric" doesn't seem to complain, but his inner knowledge of PyQt5 may allow him to workaround anything https://www.riverbankcomputing.com/pipermail/pyqt/2016-June/037665.html

@techtonik
Copy link
Contributor Author

About PySide: I won't reactivate support for it until I see a fully committed effort to fix all its bugs. So far I've only seen good intentions :-)

If your employee agrees to sponsor this work too, I guess I can find some people. But it will be more beneficial for scientific community if PySide was just marked as "unsupported" to let people move with the progress in their free time.

@Nodd
Copy link
Contributor

Nodd commented Jun 21, 2016

@ccordoba12 That will force the user to use PyQt5, while he may have PyQt4 already installed. Is it possible to add a warning in setup.py, stating that it needs a qt backend to run ?

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

4 participants