mgsky1 / DDNS

An implementation of DDNS with Python and Aliyun API 利用Python+阿里云云解析API实现DDNS
Apache License 2.0
267 stars 125 forks source link

ImportError: cannot import name 'CommonRequest' #4

Open wood-j opened 5 years ago

wood-j commented 5 years ago
Traceback (most recent call last):
  File "DDNS.py", line 13, in <module>
    from Utils import Utils
  File "/root/projects/DDNS/src/Utils.py", line 15, in <module>
    from CommonRequestSingleton import CommonRequestSing
  File "/root/projects/DDNS/src/CommonRequestSingleton.py", line 6, in <module>
    from aliyunsdkcore.request import CommonRequest
ImportError: cannot import name 'CommonRequest'

sdk过时了?还是感谢

mgsky1 commented 5 years ago

我刚测试了一下并没有过时啊,你可以检测一下阿里的SDK是否正确安装上了。 参考阿里云Python SDK帮助指南

coreychen commented 5 years ago

我也遇到这个问题了, 应该是sdk更新了吧, @mgsky1 你用的是哪个版本的sdk? 我下载的是aliyunsdkcore 1.0.3

coreychen commented 5 years ago

哦,是我错了,下错包了,不能用这个命令 pip install aliyunsdkcore.

image

VictorZhang2014 commented 4 years ago

如果您使用Python 2.x,执行以下命令,安装阿里云SDK核心库: pip install aliyun-python-sdk-core

如果您使用Python 3.x,执行以下命令,安装阿里云SDK核心库: pip install aliyun-python-sdk-core-v3

https://help.aliyun.com/document_detail/112147.html?spm=a2c4g.11174283.6.651.8d482c42n6uzrm

mgsky1 commented 4 years ago

@VictorZhang2014 感谢,原来README有点老了,刚好更新一下