当我运行导入的代码时,spynner
出现以下错误:
> python .\spynner-test.py
Traceback (most recent call last):
File ".\spynner-test.py", line 10, in <module>
import spynner
File "C:\Anaconda\lib\site-packages\spynner\__init__.py", line 2, in <module>
from browser import *
File "C:\Anaconda\lib\site-packages\spynner\browser.py", line 56, in <module>
from PyQt4.QtNetwork import QNetworkCookie, QNetworkAccessManager, QSslConfiguration, QSslCipher
ImportError: DLL load failed: The specified procedure could not be found.
有趣的是,我可以在普通的 python shell 中毫无问题地导入这些东西:
> python
Python 2.7.5 |Anaconda 1.9.2 (64-bit)| (default, Jul 1 2013, 12:37:52) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt4.QtNetwork import QNetworkCookie, QNetworkAccessManager, QSslConfiguration, QSslCipher
>>>
但import spynner
失败后,
> python
Python 2.7.5 |Anaconda 1.9.2 (64-bit)| (default, Jul 1 2013, 12:37:52) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import spynner
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda\lib\site-packages\spynner\__init__.py", line 2, in <module>
from browser import *
File "C:\Anaconda\lib\site-packages\spynner\browser.py", line 56, in <module>
from PyQt4.QtNetwork import QNetworkCookie, QNetworkAccessManager, QSslConfiguration, QSslCipher
ImportError: DLL load failed: The specified procedure could not be found.
>>> from PyQt4.QtNetwork import QNetworkCookie, QNetworkAccessManager, QSslConfiguration, QSslCipher
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
>>>