0

我正在尝试创建一个 bq 客户端 python。

我创建了 GCP json 密钥并将其导出到GOOGLE_APPLICATION_CREDENTIALS.

我尝试在 PyCharm IDE 中运行以下命令:

导出 GOOGLE_APPLICATION_CREDENTIALS="/home/.....7e7a385.json" echo $GOOGLE_APPLICATION_CREDENTIALS /home/...7e7a385.json GOOGLE_APPLICATION_CREDENTIALS="/home/....7e7a385.json"

(按照这篇文章https://stackoverflow.com/a/67224391/311130

之后我仍然收到此错误:

google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application. For more information, please see https://cloud.google.com/docs/authentication/getting-started
4

1 回答 1

2

我必须在 IDEA UI 下设置它:Edit configuration

于 2021-09-21T13:41:27.360 回答