【问题标题】:Conda environment setting os variable for Plaid Python Quickstart格子 Python 快速入门的 Conda 环境设置 os 变量
【发布时间】:2020-02-19 02:34:53
【问题描述】:

我正在设置(或尝试)设置 Plaid Python 来自动化我的个人理财。我在下面的启动脚本中遇到了问题。 (来自here)。

git clone https://github.com/plaid/quickstart.git
cd quickstart/python

# For virtualenv users
# virtualenv venv
# source venv/bin/activate

pip install -r requirements.txt

# Start the Quickstart with your API keys from the Dashboard
# https://dashboard.plaid.com/account/keys
PLAID_CLIENT_ID='CLIENT_ID' \
PLAID_SECRET='SECRET' \
PLAID_PUBLIC_KEY='PUBLIC_KEY' \
PLAID_ENV='sandbox' \
PLAID_PRODUCTS=auth,transactions \
python server.py
# Go to http://localhost:5000

到目前为止,我克隆了 repo 并创建了我的 conda 环境,但是当我尝试使用我的 API 密钥设置密钥变量时

PLAID_CLIENT_ID='mykeygoeshere' \

,我明白了

PLAID_CLIENT_ID is not a recognized as an internal or external command, operable program or batch file. 

我相信我需要在我的 conda 环境中以某种方式设置环境变量,但我想知道这样做的正确方法是什么。我读到您可以使用下面的行进行设置,但这只会影响我的虚拟环境或我的整个操作系统注册表吗?

set NEWVAR=SOMETHING

【问题讨论】:

    标签: python git environment-variables plaid


    【解决方案1】:

    varname=envvalue command 是 Unix shell 语法。所以要么你必须在 git-bash 终端中运行命令,要么你需要适应你的操作系统命令行解释器。

    操作系统似乎是 Windows,对吧? set 是命令。它只影响当前终端。为了避免在每个新终端中重复多个命令,请将它们放入批处理文件中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-10
      • 1970-01-01
      • 2020-11-26
      • 2021-10-04
      • 2015-10-14
      • 1970-01-01
      • 2020-07-22
      • 2012-10-28
      相关资源
      最近更新 更多