【问题标题】:python unit test - unable to import requests_aws4authpython单元测试-无法导入requests_aws4auth
【发布时间】:2020-04-16 16:24:29
【问题描述】:

我正在尝试使用以下命令运行测试用例

pipenv run py.test --cov=src --cov-fail-under=85 -vv test/unit --debug

它抱怨如下

<CallInfo when='collect' excinfo=<ExceptionInfo CollectError("ImportError while importing test module '/Users/omsingh0/Applications/aws/awspipeline/examples/ecommerce...in <module>\n from requests_aws4auth import AWS4Auth\nE ModuleNotFoundError: No module named 'requests_aws4auth'") tblen=7>>

当我运行 pip list 时,我可以注意到 requests-aws4auth 在那里

包版本


证书 2019.11.28 chardet 3.0.4
弹性搜索 7.1.0
idna 2.8
点 19.2.3
pipenv 2018.11.26 请求 2.22.0
请求-aws4auth 0.9
安装工具 39.0.1
urllib3 1.25.7
虚拟环境 16.7.9
virtualenv-克隆 0.5.3

如果您有任何建议,请告诉我。

【问题讨论】:

    标签: python python-unittest


    【解决方案1】:

    我能够运行下面的命令,之后就成功了。

    $ pip 安装请求 $ sudo pip install requests-aws4auth

    试试看

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-07-18
      • 2016-01-25
      • 1970-01-01
      • 2020-06-04
      • 1970-01-01
      • 1970-01-01
      • 2021-03-30
      • 2012-08-08
      相关资源
      最近更新 更多