molodiuc / pythonxy

Automatically exported from code.google.com/p/pythonxy
0 stars 0 forks source link

PyQt4-4.8.3_py26.exe cannot import QtWebKit, QtNetwork, QtHelp #237

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If relevant, please answer to the following questions:

1. What version of Python(x,y) have you installed?
Python(x,y)-2.6.5.6.exe + update(PyQt4-4.8.3_py26.exe + qwt5-5.2.1_py26.exe)

2. Which components have you installed (Python(x,y) installer: component
page):
    b. Have you selected the "Full" component selection?

3. Have you selected the option "Customize installation directories"?
b. No

5. Where did you install Python(x,y) itself?
a. default path

6. Have you installed Python(x,y):
    b. For "All users"

7. What is your operating system?
    Windows 7

8. When you installed Python(x,y), were you logged in as :
b. an administrator of the machine

9. If you are using Windows Vista, have you installed Python(x,y):
    b. by right-clicking on the installer and selecting "Run as an
administrator"

10. Regarding installed softwares on your machine, how did you clean your
machine before installing Python(x,y) (multiple answers are possible):
b. you uninstalled any previous Python distribution (including the
official .msi)

What steps will reproduce the problem?
- try to import PyQt4.QtWebKit or QtNetwork, QtHelp etc.

What is the expected output? What do you see instead?

>>> from spyderlib import spyder
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\lib\site-packages\spyderlib\spyder.py", line 50, in <module>
    from spyderlib.plugins.configdialog import (ConfigDialog, MainConfigPage,
  File "C:\Python26\lib\site-packages\spyderlib\plugins\__init__.py", line 39, in <module>
    from spyderlib.widgets.browser import WebView
  File "C:\Python26\lib\site-packages\spyderlib\widgets\browser.py", line 11, in <module>
    from PyQt4.QtWebKit import QWebView, QWebPage
ImportError: DLL load failed: The operating system cannot run %1

or 

>>> from PyQt4 import Qt  # sucess
>>> from PyQt4 import QtCore # sucess
>>> from PyQt4 import QtGui # sucess
>>> from PyQt4 import QAxContainer # sucess
>>> from PyQt4 import QtMultimedia # sucess
>>> from PyQt4 import QtOpenGL # sucess
>>> from PyQt4 import QtWebKit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The operating system cannot run %1
>>> from PyQt4 import QtHelp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The operating system cannot run %1
>>> from PyQt4 import QtNetwork
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The operating system cannot run %1

Original issue reported on code.google.com by Kim.Dohh...@gmail.com on 16 Mar 2011 at 8:56

GoogleCodeExporter commented 9 years ago
Please try the following:
1. Update Spyder to 2.0.8
2. edit C:\python26\qt.conf and c:\Python26\Lib\site-packages\PyQt4\bin\qt.conf 
to contain:
[Paths]
Prefix = C:/Python26/Lib/site-packages/PyQt4
3. delete c:\Python26\Lib\site-packages\PyQt4\qt.conf

If the above fails please provide your PATH and python26 file listing.

Original comment by grizzly.nyo on 16 Mar 2011 at 8:13

GoogleCodeExporter commented 9 years ago
I tried the method but failed. I attached my PATH and python26 file listing.

Original comment by Kim.Dohh...@gmail.com on 17 Mar 2011 at 12:55

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for data. 

Can you please resend the tree.txt with files as well as directories?

Also, please try to re-install PyQt4-4.8.3 without any other applications 
running.

Original comment by grizzly.nyo on 19 Mar 2011 at 11:05

GoogleCodeExporter commented 9 years ago
I tried again to re-install PyQt4-4.8.3 without any other applications running, 
but failed.
I attached tree.zip with file list data.

Original comment by Kim.Dohh...@gmail.com on 21 Mar 2011 at 6:05

Attachments:

GoogleCodeExporter commented 9 years ago
I researched this problem several days and I found similar issues in 
http://www.qtcentre.org/threads/28768-Windows-7-DLL-Conflicts
As shown in this page, I doubt that you missed some qt dll version upgrade.

Original comment by Kim.Dohh...@gmail.com on 22 Mar 2011 at 3:31

GoogleCodeExporter commented 9 years ago
Finally, I solved the problem.

QtNetwork.pyd and QtNetwork.dll try to import other version of openssl dlls 
(ssleay32.dll, libeay32.dll) in different paths 
(C:\Python26\Lib\site-packages\PyQt4\bin and C:\Windows\System32).
I copied these dlls from C:\Python26\Lib\site-packages\PyQt4\bin to 
C:\Windows\System32 and now, can import QtNetwork.

Original comment by Kim.Dohh...@gmail.com on 22 Mar 2011 at 3:59

GoogleCodeExporter commented 9 years ago
PyQt 4.8.4 changed the internal dir structure (reverted actually) to a scheme 
which should solve the above issue.

In a nutshell, all Qt4 DLLs and executable are placed under the PyQt's root 
directory.

The issue should be solved in the PyQt 4.8.4 package (in 2.6.6.1).

Original comment by grizzly.nyo on 2 Jul 2011 at 6:16