Closed juruchi closed 1 year ago
found a similiar error here: https://github.com/dbt-labs/dbt-core/discussions/6349
can you double check your python version:
cd hello
.\.venv\Scripts\activate
python --version
result should look like
After I created the issue I realized that I was not using the same python version so I downloaded 3.10 to see if that would change anything. With 3.10.11 this is what I'm now getting.
PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> python -m venv ./venv/
PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> .\venv\Scripts\activate
(venv) PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> pip install -r requirements.txt
Requirement already satisfied: agate==1.6.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 1)) (1.6.3)
Requirement already satisfied: attrs==22.2.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 2)) (22.2.0)
Requirement already satisfied: Babel==2.11.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 3)) (2.11.0)
Requirement already satisfied: certifi==2022.12.7 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 4)) (2022.12.7)
Requirement already satisfied: cffi==1.15.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 5)) (1.15.1)
Requirement already satisfied: charset-normalizer==2.1.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 6)) (2.1.1)Requirement already satisfied: click==8.1.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 7)) (8.1.3)
Requirement already satisfied: colorama==0.4.5 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 8)) (0.4.5)
Requirement already satisfied: dbt-core==1.3.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 9)) (1.3.2)
Requirement already satisfied: dbt-duckdb==1.3.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 10)) (1.3.3)
Requirement already satisfied: dbt-extractor==0.4.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 11)) (0.4.1)
Requirement already satisfied: duckdb==0.6.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 12)) (0.6.1)
Requirement already satisfied: future==0.18.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 13)) (0.18.2)
Requirement already satisfied: hologram==0.0.15 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 14)) (0.0.15)
Requirement already satisfied: isodate==0.6.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 16)) (0.6.1)
Requirement already satisfied: Jinja2==3.1.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 17)) (3.1.2)
Requirement already satisfied: jsonschema==3.2.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 18)) (3.2.0)
Requirement already satisfied: leather==0.3.4 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 19)) (0.3.4)
Requirement already satisfied: Logbook==1.5.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 20)) (1.5.3)
Requirement already satisfied: MarkupSafe==2.1.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 21)) (2.1.1)
Requirement already satisfied: mashumaro==3.0.4 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 22)) (3.0.4)
Requirement already satisfied: minimal-snowplow-tracker==0.0.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 23))
(0.0.2)
Requirement already satisfied: msgpack==1.0.4 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 24)) (1.0.4)
Requirement already satisfied: networkx==2.8.8 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 25)) (2.8.8)
Requirement already satisfied: numpy==1.24.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 26)) (1.24.1)
Requirement already satisfied: packaging==21.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 27)) (21.3)
Requirement already satisfied: pandas==2.0.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 28)) (2.0.1)
Requirement already satisfied: parsedatetime==2.4 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 29)) (2.4)
Requirement already satisfied: pathspec==0.9.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 30)) (0.9.0)
Requirement already satisfied: polars==0.17.9 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 31)) (0.17.9)
Requirement already satisfied: pyarrow==11.0.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 32)) (11.0.0)
Requirement already satisfied: pycparser==2.21 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 33)) (2.21)
Requirement already satisfied: pyparsing==3.0.9 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 34)) (3.0.9)
Requirement already satisfied: pyrsistent==0.19.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 35)) (0.19.3)
Requirement already satisfied: python-dateutil==2.8.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 36)) (2.8.2)
Requirement already satisfied: python-slugify==7.0.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 37)) (7.0.0)
Requirement already satisfied: pytimeparse==1.1.8 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 38)) (1.1.8)
Requirement already satisfied: pytz==2022.7 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 39)) (2022.7)
Requirement already satisfied: PyYAML==6.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 40)) (6.0)
Requirement already satisfied: requests==2.28.1 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 41)) (2.28.1)
Requirement already satisfied: six==1.16.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 42)) (1.16.0)
Requirement already satisfied: sqlparse==0.4.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 43)) (0.4.3)
Requirement already satisfied: text-unidecode==1.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 44)) (1.3)
Requirement already satisfied: typing_extensions==4.4.0 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 45)) (4.4.0)Requirement already satisfied: tzdata==2023.3 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 46)) (2023.3)
Requirement already satisfied: urllib3==1.26.13 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 47)) (1.26.13)
Requirement already satisfied: Werkzeug==2.2.2 in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from -r requirements.txt (line 48)) (2.2.2)
Requirement already satisfied: setuptools in c:\users\jcu36\desktop\github\duckdb-dbt-template\hello\venv\lib\site-packages (from jsonschema==3.2.0->-r requirements.txt (line 18)) (65.5.0)
(venv) PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> dbt compile
15:12:03 Encountered an error:
No module named 'duckdb'
15:12:03 Traceback (most recent call last):
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\main.py", line 135, in main
results, succeeded = handle_and_check(args)
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\main.py", line 198, in handle_and_check
task, res = run_from_args(parsed)
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\main.py", line 225, in run_from_args
task = parsed.cls.from_args(args=parsed)
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\task\base.py", line 186, in from_args
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\task\base.py", line 108, in from_args
config = cls.ConfigType.from_args(args)
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\runtime.py", line 263, in from_args
project, profile = cls.collect_parts(args)
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\runtime.py", line 207, in collect_parts
profile = cls.collect_profile(args=args)
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\runtime.py", line 229, in collect_profile
profile = cls._get_rendered_profile(args, profile_renderer, profile_name)
return Profile.render_from_args(args, profile_renderer, profile_name)
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\profile.py", line 426, in render_from_args
return cls.from_raw_profiles(
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\profile.py", line 392, in from_raw_profiles
return cls.from_raw_profile_info(
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\profile.py", line 346, in from_raw_profile_info
credentials: Credentials = cls._credentials_from_profile(
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\config\profile.py", line 179, in _credentials_from_profile
cls = load_plugin(typename)
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\adapters\factory.py", line 201, in load_plugin
return FACTORY.load_plugin(name)
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\adapters\factory.py", line 56, in load_plugin
mod: Any = import_module("." + name, "dbt.adapters")
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\adapters\duckdb\__init__.py", line 2, in <module>
from dbt.adapters.duckdb.connections import DuckDBConnectionManager # noqa
File "C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello\venv\lib\site-packages\dbt\adapters\duckdb\connections.py", line 10, in <module>
import duckdb
ModuleNotFoundError: No module named 'duckdb'
great! projgress! this is the same issue as #4. A few requests
I published the branch. python --version
gives 3.10.11. FYI, I got this error when running .\.venv\Scripts\activate
(venv) PS C:\Users\jcu36\Desktop\GitHub\duckdb-dbt-template\hello> .\.venv\Scripts\activate
.\.venv\Scripts\activate : The term '.\.venv\Scripts\activate' 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
+ .\.venv\Scripts\activate
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (.\.venv\Scripts\activate:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
@juruchi i made some changes in your branch and modified the setup instructions a bit. (mainly added a more detailed Python environment setup + moved everything to root).
Please start from step 1.7 Setup Local Python Environment. Please let me know if this works for you; if bugs please report here and which step.
Thanks!!
@ran-codes It worked! FYI, in the second step of 1.8 there's an extra space in dbt –-version
which was causing me to get a different output than the one shown in the screenshot.
YAY! 🥳 I'm glad we fixed it. (The was to specify which version of Python while setting up the local environment!!) Thank you for helping work through it.
re the extra space. Thanks for the heads up it will be fixed!
closing this issue as it has been resolved.