spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.34k stars 1.62k forks source link

Spyder does not work with latest PyQT (ver 4.8.3) on Windows #636

Closed spyder-bot closed 9 years ago

spyder-bot commented 9 years ago

From prashant...@gmail.com on 2011-04-20T23:48:37Z

In check_pyqt() the version mentioned is 4.4. If u install PtQt4.8 and later which is the latest download available. spyder stops working. By commenting the function call check_pyqt()everything works fine.

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=636

spyder-bot commented 9 years ago

From pierre.raybaut on 2011-04-21T00:31:50Z

Spyder has already been tested successfully with PyQt 4.8.3, since the version was released actually. I'm working with it everyday for a while now.

The fact that PyQt v4.4 is detected with check_pyqt on your computer can't be an error. Try the following:

  1. open a terminal (cmd.exe if you are on Windows)
  2. type 'python' to run the standard Python interpreter
  3. type: import PyQt4.QtCore as QC print QC.PYQT_VERSION_STR

And report back here the output.

spyder-bot commented 9 years ago

From tma...@gmail.com on 2011-04-26T10:35:58Z

I'm trying to install spyder as a first time user, and have the same problem described in the original post: I've got PyQt4 v4.8.3 installed on a Windows 7 machine, but spyder doesn't recognize it. I can "import PyQt4" in a python shell, but "import PyQt4.QtCore" fails ("DLL load failed: the specified procedure could not be found.") BTW, the "fix" of commenting out the check_pyqt() line in requirements.py did NOT work for me..

spyder-bot commented 9 years ago

From tma...@gmail.com on 2011-04-26T13:17:05Z

Update: I found the following discussion after some Googling: http://stackoverflow.com/questions/2140836/pyqt-4-7-importerror-after-installing-on-windows/5795870#5795870 I can now launch spyder after copying the PyQt dlls from the \bin folder up to its parent PyQt folder. This is my first time using spyder, so I don't know if there are any other issues that this "work-around" does not address, but this seems to work for now..

spyder-bot commented 9 years ago

From pierre.raybaut on 2011-04-27T04:29:33Z

The fact that commenting out the check_pyqt call did not solve your problem probably means that it's not the same situation here. What you describe is an installation issue related to the PyQt Windows installer and has nothing to do with Spyder.

This problem started happening since release v4.7 of PyQt: the developper has decided to move binaries to a subfolder "bin". If this folder is in your PATH, it should work. But if you also have a directory containing Qt dlls in your PATH and if this directory is located before the PyQt's bin directory, then it will produce the error "DLL load failed: the specified procedure could not be found." because the Qt DLL that the system has found is not the right one.

So the clean solution is not to move the binaries from "bin" to the parent folder, but to move the "bin" path at first position of your PATH environment variable (the best is to put it at first position of the "all users" PATH environement variable, to be sure that no other directory is scanned before this one). Check that the "bin" folder is in the first position of your PATH env var:

spyder-bot commented 9 years ago

From tma...@gmail.com on 2011-04-27T06:57:22Z

Got it, thanks!

spyder-bot commented 9 years ago

From Armin.R.Schmidt on 2011-04-30T04:49:51Z

I am not sure that mine is the same issue but it could be ...

I have just upgraded to xy 2.6.6 on my XP machine and now I can't start Spyder any more. Simply nothing happens. It neither starting it from the xy panel nor from the start menu folder will do anything.

So I tried to start it from the cmd promt with C:\Python26\python.exe "C:\Python26\Scripts\spyder" and that gives the following error:

from PyQt4.QtWebKit import *

ImportError: DLL load failed: The operating system cannot run %1.

I am not sure how the dll import works but in my PyQt4\bin directory I only have QtWebKit4.dll and not QtWebKit.dll - whether that makes a difference?

Any help would be appreciated.

spyder-bot commented 9 years ago

From pierre.raybaut on 2011-04-30T04:58:51Z

It could be the same issue even if this is the first time that I see this error message in particular.

Please try to change your PATH environment variable as I mentioned above, just to be sure that the PyQt4's bin directory is really the first directory in PATH.

spyder-bot commented 9 years ago

From Armin.R.Schmidt on 2011-04-30T17:59:54Z

I had done this already. I wonder whether the pxy 2.6.6 installation has made the path excessively long so that not all of it is parsed? Below is my %PATH%:

C:\Python26\Lib\site-packages\PyQt4\bin;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOW S\System32\Wbem;C:\BATS;C:\Program Files\ArcGIS\bin;C:\Program Files\Leica Geosy stems\Shared;C:\Program Files\QuickTime\QTSystem\;C:\Python26\Lib\site-packages\ PyQt4\bin;C:\WINDOWS\System32;C:\Python26;C:\Python26\DLLs;C:\Python26\Scripts;C :\Python26\gnuplot\bin;C:\Python26\Lib\site-packages\vtk;C:\Python26\OpenCV\bin; C:\Program Files\pythonxy\console;C:\Program Files\pythonxy\SciTE-2.25;C:\Progra m Files\pythonxy\mingw\bin;C:\Program Files\pythonxy\swig;C:\Program Files\pytho nxy\gettext\bin;C:\Program Files\Common Files\Ahead\Lib\

I should also note that there is a potential probelm with the ArcGIS\bin path. I need this to let ArcGIS run its own Python version (python.exe) but don't know what exactly that is. Otherwise there is a lot of ArcGIS (9.2) functionality that doesn't work. But I don't think this is the issue with my reported problem.

spyder-bot commented 9 years ago

From Armin.R.Schmidt on 2011-04-30T18:14:35Z

I have now tried the "dirty" solution and simply copied all the dll's into the parent directory up from \bin.

And now Spyder loads without problems.

So the conclusion would be that somewhere there might be a hard-coded link to that directory which isn't looking at the %PATH% variable.

spyder-bot commented 9 years ago

From ccordoba12 on 2011-05-27T08:30:28Z

Summary: Spyder does not work with latest PyQT (ver 4.8.3) on Windows
Labels: OpSys-Windows

spyder-bot commented 9 years ago

From ccordoba12 on 2011-05-27T08:31:53Z

Labels: Cat-Miscelleneous

spyder-bot commented 9 years ago

From pierre.raybaut on 2011-05-27T14:15:03Z

The 'bin' folder location issue is now fixed with PyQt v4.8.4 official Windows installer (or Python(x,y) plugin).

Status: Fixed