我正在使用 jupyter 笔记本,我正在尝试通过笔记本使用 PyAthena 模块查询 AWS athena。
我在项目中的第一行是:
athena = pyathena.connect(profile_name="NAME")
它适用于我计算机上的任何其他平台(iPython,Pycharm ..),但不适用于 Jupyter Notebook,并返回:
ProfileNotFound: The config profile (core) could not be found
我尝试像这样更改 env 变量:!set AWS_CONFIG_FILE="~/.aws/config"
但它没有用。
有任何想法吗?