简体   繁体   English

安装 pip 安装 dbt-postgres

[英]installation pip install dbt-postgres

I guess just installed dbt-postgres according to the article https://docs.getdbt.com/dbt-cli/install/pip using command pip install dbt-postgres after the installation I have everywhere Requirements already satisfied我想刚刚根据文章https://docs.getdbt.com/dbt-cli/install/pip使用命令pip 安装 dbt-postgres安装后安装了 dbt-postgres 我到处都有要求已经满足在此处输入图像描述

When I try the command to see the version I have an error ''dbt' is not recognized as an internal or external command, operable program or batch file.'当我尝试使用命令查看版本时出现错误“dbt”未被识别为内部或外部命令、可运行程序或批处理文件。 Does this mean that I didn't downloaded this?这是否意味着我没有下载这个? How to check the version?如何查看版本? 在此处输入图像描述

pip is saying that you already have dbt-postgres installed ("Requirement already satisfied") in your local Python 3.10 environment. pip表示您已经在本地 Python 3.10 环境中安装了dbt-postgres (“已满足要求”)。

Windows is complaining because that Python's site-packages directory is not on your PATH. Windows 正在抱怨,因为 Python 的 site-packages 目录不在您的 PATH 中。 This is typical;这是典型的; depending on how you install Python on Windows, it is not automatically added to your PATH.根据您在 Windows 上安装 Python 的方式,它不会自动添加到您的 PATH 中。 (PATH is an environment variable that tells your shell where to search for the commands you type in -- each command is the name of an executable file in a folder somewhere, and PATH is a list of folders to search in for those executable files). (PATH 是一个环境变量,它告诉您的 shell 在哪里搜索您输入的命令——每个命令都是某处文件夹中可执行文件的名称,而 PATH 是要搜索这些可执行文件的文件夹列表) .

There are a few ways to add Python to your PATH -- see the official docs on this subject.有几种方法可以将 Python 添加到您的 PATH - 请参阅有关此主题的官方文档 If you're new to all of this, your best bet might be to uninstall and re-install Python. The Windows Store is now the best way to do this.如果您对所有这些都不熟悉,最好的办法可能是卸载并重新安装Python。Windows 商店现在是执行此操作的最佳方式。

HOWEVER there is another issue here too -- you're trying to run dbt on Python 3.10, but currently dbt only supports older versions of Python (3.7-3.9).然而,这里也存在另一个问题——您正在尝试在 Python 3.10 上运行 dbt,但目前 dbt 仅支持旧版本的 Python (3.7-3.9)。 So when you re-install Python, you're going to want to specify 3.9 (which I linked to above).因此,当您重新安装 Python 时,您将要指定 3.9(我在上面链接)。

Managing multiple versions of Python on your machine can be a real pain, especially on Windows. If you have someone more experienced in your organization (like an engineer who knows Python well), it's well worth your time to get someone to pair with you on this while you work it out.在你的机器上管理 Python 的多个版本真的很痛苦,尤其是在 Windows 上。如果你的组织中有更有经验的人(比如非常了解 Python 的工程师),那么花时间找人与你配对是非常值得的在你解决这个问题的时候。

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

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