要求:运行python解密文件
我已经在 MacOS 的虚拟环境中安装了 gnupg,也import gnupg可以正常工作,但第二行抛出错误,如下所示
>>> gpg = gnupg.GPG() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/.local/share/virtualenvs/mypython-sPLN-T2A/lib/python3.8/site-packages/gnupg/gnupg.py", line 117, in __init__ super(GPG, self).__init__( File "/Users/.local/share/virtualenvs/mypython-sPLN-T2A/lib/python3.8/site-packages/gnupg/_meta.py", line 182, in __init__ self.binary = _util._find_binary(binary) File "/Users/.local/share/virtualenvs/mypython-sPLN-T2A/lib/python3.8/site-packages/gnupg/_util.py", line 429, in _find_binary raise RuntimeError("GnuPG is not installed!") RuntimeError: GnuPG is not installed!
代码
import gnupg
gpg = gnupg.GPG()
Run Code Online (Sandbox Code Playgroud)
解决方案:
我终于能够解决这个问题了
brew install GnuPG要求:使用官方 docker-compose 和 Airflow 版本 2.3.0 运行本地 Airflow 问题:“You are running pip as root Please use user to run pip”
Airflow 版本 2.3.0 操作系统 - macOS
我可以在 2.2.4 上正常运行,但在 2.3.0 上不行
在运行之前也运行了以下命令docker-compose up airflow-init
mkdir -p ./dags ./logs ./plugins
echo -e "AIRFLOW_UID=$(id -u)" > .env
Run Code Online (Sandbox Code Playgroud)
Docker-Compose curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.3.0/docker-compose.yaml'
SQL:检查付款日期是否在退货期后下个月的19号之前
\n要求是确定OnTime Payment \'Y\'/\'N\'
\n\xe2\x80\xa2 If monthly = PAID before the 19th of the month following the return period\nExample: Jan-Jan payment deadline = Feb 19\n\xe2\x80\xa2 If quarterly = paid before the 16th of the 2nd month following the return period\nExample: Jan-Mar payment deadline = May 16\n\xe2\x80\xa2 If last quarterly = paid before the 30th of the month following the return period\nExample: Oct-Dec payment deadline = Jan 30\nRun Code Online (Sandbox Code Playgroud)\n对于季度,如果是最后一个季度,则在下个月的 30 日支付,对于季度月的其余时间,则在该月的 16 日支付
\nwith data as (\n …Run Code Online (Sandbox Code Playgroud) 我第一次安装brew install terraform并且运行良好但后来我尝试安装特定版本,如下所示
wget -P terraform_bin/ https://releases.hashicorp.com/terraform/0.12.0/terraform_0.12.0_linux_amd64.zip
unzip -o terraform_bin/terraform_0.12.0_linux_amd64.zip -d terraform_bin/
mv terraform_bin/terraform /usr/local/bin
rm -rf terraform_bin
terraform version
Run Code Online (Sandbox Code Playgroud)
但现在它在 MacOS 中的安装变得混乱,当尝试运行版本时它失败了
airflow ×1
airflow-2.x ×1
gnupg ×1
macos ×1
oh-my-zsh ×1
python-3.x ×1
snowflake-cloud-data-platform ×1
sql ×1
terraform ×1
zsh ×1