我尝试在带有 Python 2.7 的 Visual Studio 2013 中使用 rauth,但它在第一行失败:
from rauth import OAuth1Session
由于缺少结构:
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7 \IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.0\
visualstudio_py_util.py", line 76, in exec_file
exec(code_obj, global_variables)
File "c:\users\gustav.cactus\documents\visual studio 2013\Projects\PythonApplicationRauth1\PythonApplicationRauth1\
PythonApplicationRauth1.py", line 2, in <module>
from rauth import OAuth1Session
File "C:\Python27\lib\site-packages\rauth\__init__.py", line 22, in <module>
from .service import OAuth1Service, OAuth2Service, OflyService
File "C:\Python27\lib\site-packages\rauth\service.py", line 10, in <module>
from rauth.session import OAuth1Session, OAuth2Session, OflySession
File "C:\Python27\lib\site-packages\rauth\session.py", line 16, in <module>
from rauth.oauth import HmacSha1Signature
File "C:\Python27\lib\site-packages\rauth\oauth.py", line 15, in <module>
from rauth.utils import FORM_URLENCODED
File "C:\Python27\lib\site-packages\rauth\utils.py", line 11, in <module>
from requests.structures import CaseInsensitiveDict as cidict
ImportError: No module named structures
我已经安装了所有必需的模块,但拒绝安装的 pycrypto 除外:
警告:未找到 GMP 或 MPIR 库;不构建 Crypto.PublicKey._fastmath。错误:无法找到 vcvarsall.bat
知道如何解决这个问题吗?