简体   繁体   English

NameError:名称“boto3”未定义

[英]NameError: name 'boto3' is not defined

I am working with jupyter and python, and am getting the error 'NameError: name 'boto3' is not defined', even though I have it installed and upgraded.我正在使用 jupyter 和 python,并且收到错误“NameError: name 'boto3' is not defined”,即使我已经安装和升级了它。 I have attached some code.我附上了一些代码。 Thank you!谢谢!

pip install boto3 --user
pip install boto3 --upgrade
s3 = boto3.resource('s3')

You need to import the boto3 library before using it in Python ◡̈在Python中使用前需要导入boto3库◡̈

import boto3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM