After updating pandas to the latest version, 0.20.1, spyder (v3.1.4, Python 2.7.9 64bits, Qt 4.8.6, PyQt4 (API v2) 4.11.3) on Linux, Fedora 21, does not start anymore, and issues the following error message

Traceback (most recent call last):
  File "/usr/local/bin/spyder", line 11, in <module>
    sys.exit(main())
  File "/usr/pkg/python/Python-2.7.9/lib/python2.7/site-packages/spyder/app/start.py", line 103, in main
    from spyder.app import mainwindow
  File "/usr/pkg/python/Python-2.7.9/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 49, in <module>
    requirements.check_qt()
  File "/usr/pkg/python/Python-2.7.9/lib/python2.7/site-packages/spyder/requirements.py", line 39, in check_qt
    import qtpy
  File "/usr/pkg/python/Python-2.7.9/lib/python2.7/site-packages/qtpy/__init__.py", line 96, in <module>
    sip.setapi('QString', 2)
ValueError: API 'QString' has already been set to version 1

Reverting to the previous installed version, v0.19.2 makes spyder work again.

It looks like pandas v0.20.1 is somehow setting the PyQt API to version 1:

python
Python 2.7.9 (default, Mar 10 2015, 13:30:05) 
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas, sip
>>> print(pandas.__version__)
0.20.1
>>> print(sip.getapi("QString"))
1

With v0.19.2 (and every other python package unchanged), QString is undefined

Python 2.7.9 (default, Mar 10 2015, 13:30:05) 
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas, sip
>>> print(pandas.__version__)
0.19.2
>>> print(sip.getapi("QString"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: unknown API 'QString'

Note that this Python has been compiled and installed from source, it's neither the Python included in the Fedora repositories, nor the Anaconda's Python.

Is this a bug or some sort of configuration problem?

Comment From: jorisvandenbossche

I suppose this is related to the clipboard issue, which should be fixed in the upcoming 0.20.2.

Comment From: TomAugspurger

That was my thought as well: https://github.com/pandas-dev/pandas/issues/16322

@ncaon can you try installing pandas master to see if that fixes the issue?

Comment From: jorisvandenbossche

See PR https://github.com/pandas-dev/pandas/pull/16294 that prevents clipboard functionality (and thys PyQt4) to be imported on the main import.

Would you be able to check that it works with pandas master?

Comment From: ncaon

I'm happy to confirm that with pandas 0.21.0.dev+105.g03d44f3 the issue is fixed

Comment From: TomAugspurger

Thanks. 0.20.2 should be out in a couple days.