{"action":"created","issue":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/797","labels_url":"https://api.github.com/repos/spyder-ide/spyder/issues/797/labels{/name}","comments_url":"https://api.github.com/repos/spyder-ide/spyder/issues/797/comments","events_url":"https://api.github.com/repos/spyder-ide/spyder/issues/797/events","html_url":"https://github.com/spyder-ide/spyder/issues/797","id":57869712,"number":797,"title":"spyderlib/qt/QtGui.py -- ImportError: cannot import name QKeySequence (on Ubuntu 10.04)","user":{"login":"spyder-issues-migrator","id":11021581,"avatar_url":"https://avatars.githubusercontent.com/u/11021581?v=3","gravatar_id":"","url":"https://api.github.com/users/spyder-issues-migrator","html_url":"https://github.com/spyder-issues-migrator","followers_url":"https://api.github.com/users/spyder-issues-migrator/followers","following_url":"https://api.github.com/users/spyder-issues-migrator/following{/other_user}","gists_url":"https://api.github.com/users/spyder-issues-migrator/gists{/gist_id}","starred_url":"https://api.github.com/users/spyder-issues-migrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyder-issues-migrator/subscriptions","organizations_url":"https://api.github.com/users/spyder-issues-migrator/orgs","repos_url":"https://api.github.com/users/spyder-issues-migrator/repos","events_url":"https://api.github.com/users/spyder-issues-migrator/events{/privacy}","received_events_url":"https://api.github.com/users/spyder-issues-migrator/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/2%E2%80%935%20stars","name":"2–5 stars","color":"FFFFFF"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/invalid","name":"invalid","color":"e6e6e6"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/PyQt","name":"PyQt","color":"FFFFFF"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/Spyder-Gui","name":"Spyder-Gui","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-17T00:47:07Z","updated_at":"2015-02-17T00:47:10Z","closed_at":null,"body":"_From [pierre.raybaut](https://code.google.com/u/pierre.raybaut/) on 2011-10-11T12:47:15Z_\n\nBug submitted to me recently by a user:\r\n\\--------------------------------------\r\n\r\n\"I was not coding for a while, but today starting spyder (the latest linux version, 2.0.12), I had the following error message:\r\n\r\nTraceback (most recent call last):\r\n File \"/usr/local/bin/spyder\", line 2, in \\<module>\r\n   from spyderlib import spyder\r\n File \"/usr/local/lib/python2.6/dist-packages/spyderlib/spyder.py\", line 38, in \\<module>\r\n   from spyderlib.qt.QtGui import (QApplication, QMainWindow, QSplashScreen,\r\n File \"/usr/local/lib/python2.6/dist-packages/spyderlib/qt/QtGui.py\", line 10, in \\<module>\r\n   from PyQt4.Qt import QKeySequence, QTextCursor\r\nImportError: cannot import name QKeySequence\r\n\r\nI guess that there was an update in PyQt4 or something, because I tried also on my laptop and I had the same issue... Do you have any idea on how to solve the problem? I am using ubuntu 10.4 LTS 64 on both my machines. My version of PyQt4 is 4.7.2-0ubuntu1.\"\n\n_Original issue: http://code.google.com/p/spyderlib/issues/detail?id=797_"},"comment":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/comments/74599069","html_url":"https://github.com/spyder-ide/spyder/issues/797#issuecomment-74599069","issue_url":"https://api.github.com/repos/spyder-ide/spyder/issues/797","id":74599069,"user":{"login":"spyder-issues-migrator","id":11021581,"avatar_url":"https://avatars.githubusercontent.com/u/11021581?v=3","gravatar_id":"","url":"https://api.github.com/users/spyder-issues-migrator","html_url":"https://github.com/spyder-issues-migrator","followers_url":"https://api.github.com/users/spyder-issues-migrator/followers","following_url":"https://api.github.com/users/spyder-issues-migrator/following{/other_user}","gists_url":"https://api.github.com/users/spyder-issues-migrator/gists{/gist_id}","starred_url":"https://api.github.com/users/spyder-issues-migrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyder-issues-migrator/subscriptions","organizations_url":"https://api.github.com/users/spyder-issues-migrator/orgs","repos_url":"https://api.github.com/users/spyder-issues-migrator/repos","events_url":"https://api.github.com/users/spyder-issues-migrator/events{/privacy}","received_events_url":"https://api.github.com/users/spyder-issues-migrator/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T00:47:10Z","updated_at":"2015-02-17T00:47:10Z","body":"_From [strickla...@gmail.com](https://code.google.com/u/111045366386016874016/) on 2015-02-16T12:26:20Z_\n\nI've been hunting this bug all day and I finally got it figured out.\r\n\r\nSymptoms:\r\n-- Start menu shortcut for spyder -> nothing happens. (this is because pythonw.exe runs in the background, so you don't see the traceback.\r\n\r\n-- Running spyder.exe by double clicking in Windows explorer at C:\\Anaconda\\Scripts does nothing either.\r\n\r\n-- If you open a terminal (cmd.exe) and try running spyder via typing in the full path of spyder.exe (i.e. C:\\Anaconda\\Scripts\\spyder.exe) you finally get an error message:\r\nTraceback (most recent call last):\r\n  File \"C:\\Anaconda\\Scripts\\spyder-script.py\", line 2, in \\<module>\r\n    start_app.main()\r\n  File \"C:\\Anaconda\\lib\\site-packages\\spyderlib\\start_app.py\", line 91, in main\r\n    from spyderlib import spyder\r\n  File \"C:\\Anaconda\\lib\\site-packages\\spyderlib\\spyder.py\", line 101, in \\<module>\r\n    from spyderlib.qt.QtGui import (QApplication, QMainWindow, QSplashScreen,\r\n  File \"C:\\Anaconda\\lib\\site-packages\\spyderlib\\qt\\QtGui.py\", line 10, in \\<module>\r\n    from PyQt4.Qt import QKeySequence, QTextCursor  # analysis:ignore\r\nImportError: cannot import name QKeySequence\r\n\r\n-- You previously or currently have another Python distribution on your computer. In my case, it was a WinPython distribution that I had once registered with the system. This meant that opening up cmd.exe and just typing spyder actually worked... it launched spyder from the portable WinPython distribution sitting somewhere else on my computer, not from Anaconda.\r\n\r\nSolution:\r\nIf another python distribution is registered with the system, its directories are listed in the system variables Path, likely in an order so that the system searches there before in the Anaconda folders. You can verify this by going to Advanced system settings in PC Info or Control Panel->System, Environment Variables, and look under System Variables for Path. Click and hit Edit. You get a possibly long semi-colon list of directories. Look for those belonging to another python distribution and delete only those, so that everything else including the Anaconda folders remain. It might also be possible to just reorder so that the Anaconda folders are first. I haven't tried this.\r\n\r\nNow restart your computer to reload the Path variable and check that everything works."}}