Skip to content

Updating pandas to v0.20.1 breaks Spyder #16551

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
ncaon opened this issue May 31, 2017 · 5 comments
Closed

Updating pandas to v0.20.1 breaks Spyder #16551

ncaon opened this issue May 31, 2017 · 5 comments

Comments

@ncaon
Copy link

ncaon commented May 31, 2017

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?

@jorisvandenbossche
Copy link
Member

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

@TomAugspurger
Copy link
Contributor

That was my thought as well: #16322

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

@jorisvandenbossche
Copy link
Member

See PR #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?

@ncaon
Copy link
Author

ncaon commented May 31, 2017

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

@TomAugspurger
Copy link
Contributor

Thanks. 0.20.2 should be out in a couple days.

@TomAugspurger TomAugspurger added this to the No action milestone May 31, 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
Development

No branches or pull requests

3 participants