Python 3.x ModuleNotFoundError:没有名为';ebaysdk';

Python 3.x ModuleNotFoundError:没有名为';ebaysdk';,python-3.x,ebay-api,Python 3.x,Ebay Api,我试图执行下面的代码,但我得到了一个错误,如标题中所示。ebaysdk是使用pip3安装的,然后是easy_安装,但仍然存在错误,尽管安装时满足了所有依赖项,但没有ebaysdk.py文件,请参阅下面的代码: import datetime from ebaysdk.exception import ConnectionError from ebaysdk.finding import Connection try: api = Connection(appid=**<mykey

我试图执行下面的代码,但我得到了一个错误,如标题中所示。ebaysdk是使用pip3安装的,然后是easy_安装,但仍然存在错误,尽管安装时满足了所有依赖项,但没有ebaysdk.py文件,请参阅下面的代码:

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())
导入日期时间
从ebaysdk.exception导入ConnectionError
从ebaysdk.finding导入连接
尝试:
api=连接(appid=***,config\u file='ebay.yaml')
response=api.execute('FindItemAdvanced',{'keywords':'legos'})
断言(response.reply.ack=='Success')
断言(类型(response.reply.timestamp)=datetime.datetime)
断言(类型(response.reply.searchResult.item)==list)
item=response.reply.searchResult.item[0]
断言(类型(item.listingInfo.endTime)=datetime.datetime)
断言(类型(response.dict())==dict)
除连接错误外,如e:
打印(e)
打印(e.response.dict())
我正在使用Python3.6(Anaconda),使用timotheus'ebaysdk-

非常感谢您的帮助。

问题已解决


除了3.6,我还有3.5.2和2.7。删除了所有版本并重新安装了clean 3.6。

以下解决方案适合我:

我在安装ebaysdk时遇到了这个问题:

pip3 install ebaysdk
卸载后,我使用以下方法再次安装:

pip install ebaysdk

这对我来说很好

问题显示了一个可能与环境中安装的多个pip有关的问题。这不是一个明确的答案,因为您的目的可能对您有效,因为
pip
指向您正在使用的python,但是
pip3
没有,并且不是因为它只使用
pip
而不是
pip3
有效。我的问题还在于安装了多个python版本,当我卸载并重新安装它时,它对我有效。(我也卸载并重新安装了python)