【问题标题】:Import boto3 error in python在python中导入boto3错误
【发布时间】:2016-05-19 14:24:53
【问题描述】:

我使用pip2.7 install boto3 安装了boto3。现在,当我执行具有import boto3python2.7 script.py 时,我得到ImportError: No module named boto3。当我再次执行pip2.7 install boto3 时,我得到Requirement already satisfied (use --upgrade to upgrade): boto3 in /usr/local/lib/python2.7/site-packages

为什么会出现这个错误,我该如何解决?

注意:我根据this SO question做了pip2.7 install boto3

【问题讨论】:

  • 请尽量安装在标准的Virtualenv下。由于不同的操作系统设置,pip 可能会将软件包安装到不在正确 PYTHONPATH 中的文件夹中。

标签: python boto3


【解决方案1】:

我也遇到过同样的问题,也没有使用虚拟环境。 easy_install 对我有用。我正在使用 ubuntu 16.04 和 python 版本 2.7

easy_install boto3

【讨论】:

    猜你喜欢
    • 2018-06-05
    • 1970-01-01
    • 1970-01-01
    • 2016-05-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多