Repository: spyder-ide/spyder

Issue:
Spyder is not installing the PyQt5 wheel when using pip
## 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
```



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

@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.

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'
```

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

``` diff
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.

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 ?

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 :-)

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

> 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.

@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 ?


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -289,6 +289,7 @@ def run(self):
     'pyzmq',
     'chardet>=2.0.0',
     'numpydoc',
+    'pyqt5',
     # This is only needed for our wheels on Linux.
     # See issue #3332
     'pyopengl;platform_system=="Linux"'


Test patch: