微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 jetson nano 上为 python2.7 安装 boto3

如何解决在 jetson nano 上为 python2.7 安装 boto3

我想在我的 jetson nano 上为 python 2.7 安装 boto3。它目前安装在 python3.6 的站点包中,因此我可以在 python3 中导入它。但是我无法在 python2.7 中访问它。它说找不到模块。

jetson@jetson-desktop:~$ pip install boto3
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: boto3 in ./.local/lib/python3.6/site-packages (1.17.43)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in ./.local/lib/python3.6/site-packages (from boto3) (0.10.0)
Requirement already satisfied: botocore<1.21.0,>=1.20.43 in ./.local/lib/python3.6/site-packages (from boto3) (1.20.43)
Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in ./.local/lib/python3.6/site-packages (from boto3) (0.3.6)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in ./.local/lib/python3.6/site-packages (from botocore<1.21.0,>=1.20.43->boto3) (1.26.4)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in ./.local/lib/python3.6/site-packages (from botocore<1.21.0,>=1.20.43->boto3) (2.8.1)
Requirement already satisfied: six>=1.5 in ./.local/lib/python3.6/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.21.0,>=1.20.43->boto3) (1.15.0)

我希望它适用于 python2。我无法将安装定向到 python2。

解决方法

尝试安装:

  • $ git clone https://github.com/boto/boto3.git
  • $ cd boto3
  • $ virtualenv venv
  • $ 。 venv/bin/激活
  • $ python -m pip install -r requirements.txt
  • $ python -m pip install -e .
  • $ python -m pip install boto3

并检查

https://github.com/boto/boto3

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。