2017-07-05 74 views
0

我试图执行下面的代码,但是在标题中出现错误。使用PIP 3,然后easy_install的,仍然错误,尽管在安装被满足所有的依赖,但没有ebaysdk.py文件,请参阅下面我的代码安装ebaysdk:ModuleNotFoundError:没有名为'ebaysdk'的模块

import datetime 
from ebaysdk.exception import ConnectionError 
from ebaysdk.finding import Connection 

try: 
    api = Connection(appid=**<mykey>**, config_file='ebay.yaml') 
    response = api.execute('findItemsAdvanced', {'keywords': 'legos'}) 

    assert(response.reply.ack == 'Success') 
    assert(type(response.reply.timestamp) == datetime.datetime) 
    assert(type(response.reply.searchResult.item) == list) 

    item = response.reply.searchResult.item[0] 
    assert(type(item.listingInfo.endTime) == datetime.datetime) 
    assert(type(response.dict()) == dict) 

except ConnectionError as e: 
    print(e) 
    print(e.response.dict()) 

我使用Python 3.6(蟒蛇) ,与timotheus' ebaysdk - https://github.com/timotheus/ebaysdk-python一起工作。

我将不胜感激您的帮助。

回答

0

问题已解决。

除了3.6我还有3.5.2和2.7。摆脱所有版本,并重新安装清洁3.6。

相关问题