Reputation: 45
I hope you can help me! I have used DBT before with no issues on a macbook before but for some reason even after installing DBT on windows I am receiving errors in the visual studio terminal, giving me the error
dbt : The term 'dbt' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
i have tried using dbt debug,dbt run, configured my sample profiles_yaml, project profiles_yaml and my profiles.yaml file and i still get the above error n my terminal. Please can someone help me, I am happy to share more with you if needed and am so worried over this as I am stumped as to what the issue may be. I tried reinstalling it via powershell and get an error saying some dependencies may be missing, though bigquery dbt is installed.
Thank you for your help
Lily
Upvotes: 2
Views: 11741
Reputation: 11
I think this is happening because VS Code is using PowerShell as the default terminal, if you run in cmd like the first screenshot you shared below, it should behave as expected, for this you can use ctrl + shift + p
in VS Code, and at the bar type Open Settings (JSON)
in there you can add the following:
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"
This way VS Code will use CMD instead of PowerShell to run commands in Windows.
Upvotes: 1
Reputation: 8421
I have installed dbt
through pip
. It's under the Script
folder in the individual python environment. If I have not activated the python environment, it will not work.
Upvotes: 1
Reputation: 3961
Python on Windows is tricky. Did you install Anaconda already? How about the Visual Studio Code Python extension? You may want to add the Python install that has dbt to your PATH
variable.
https://docs.python.org/3.9/using/windows.html#configuring-python
Upvotes: 0