<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Declarative Pipeline with editable wheel: PYTHON.MODULE_NOT_FOUND_ERROR in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/declarative-pipeline-with-editable-wheel-python-module-not-found/m-p/172599#M56658</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I create a bundle with&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;databricks bundle init&lt;/LI-CODE&gt;&lt;P&gt;and i let create a pipeline including a package.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The pipeline definition looks like the following&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# The main pipeline for pipelinewithpackage

resources:
  pipelines:
    pipelinewithpackage_etl:
      name: pipelinewithpackage_etl
      catalog: ${var.catalog}
      schema: ${var.schema}
      serverless: true
      root_path: "../src/pipelinewithpackage_etl"

      libraries:
        - glob:
            include: ../src/pipelinewithpackage_etl/transformations/**

      environment:
        dependencies:
          # We include every dependency defined by pyproject.toml by defining an editable environment
          # that points to the folder where pyproject.toml is deployed.
          - --editable ${workspace.file_path}&lt;/LI-CODE&gt;&lt;P&gt;The package looks like the following&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="databricks.png" style="width: 193px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/31985i91134B8AF2D1588F/image-size/large?v=v2&amp;amp;px=999" role="button" title="databricks.png" alt="databricks.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, I want to use the package in my pipeline. So I simply added&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from pipelinewithpackage import taxis&lt;/LI-CODE&gt;&lt;P&gt;before my&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/25059"&gt;@DP&lt;/a&gt;.table defintions. This is the only modificaiton which I did - the rest of the code is the generatedbundle code.&lt;/P&gt;&lt;P&gt;I deploy the bundle and run it: then i get the&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;ModuleNotFoundError: No module named 'pipelinewithpackage'&lt;/STRONG&gt; error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the cluster logs I can see, that the wheel is created:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Building wheels for collected packages: pipelinewithpackage
  Building editable for pipelinewithpackage (pyproject.toml): started
  Building editable for pipelinewithpackage (pyproject.toml): finished with status 'done'
  Created wheel for pipelinewithpackage: filename=pipelinewithpackage-0.0.1-py3-none-any.whl size=1433 sha256=492c44e0c2d9eb063b3f3c01a6fffe9d1699de5123a389a0e8b5708bbf61060c
Successfully built pipelinewithpackage
Installing collected packages: pipelinewithpackage
Successfully installed pipelinewithpackage-0.0.1&lt;/LI-CODE&gt;&lt;P&gt;Why isn't it finding the library?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Oct 2026 18:33:22 GMT</pubDate>
    <dc:creator>a_user12</dc:creator>
    <dc:date>2026-10-10T18:33:22Z</dc:date>
    <item>
      <title>Declarative Pipeline with editable wheel: PYTHON.MODULE_NOT_FOUND_ERROR</title>
      <link>https://community.databricks.com/t5/data-engineering/declarative-pipeline-with-editable-wheel-python-module-not-found/m-p/172599#M56658</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I create a bundle with&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;databricks bundle init&lt;/LI-CODE&gt;&lt;P&gt;and i let create a pipeline including a package.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The pipeline definition looks like the following&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# The main pipeline for pipelinewithpackage

resources:
  pipelines:
    pipelinewithpackage_etl:
      name: pipelinewithpackage_etl
      catalog: ${var.catalog}
      schema: ${var.schema}
      serverless: true
      root_path: "../src/pipelinewithpackage_etl"

      libraries:
        - glob:
            include: ../src/pipelinewithpackage_etl/transformations/**

      environment:
        dependencies:
          # We include every dependency defined by pyproject.toml by defining an editable environment
          # that points to the folder where pyproject.toml is deployed.
          - --editable ${workspace.file_path}&lt;/LI-CODE&gt;&lt;P&gt;The package looks like the following&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="databricks.png" style="width: 193px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/31985i91134B8AF2D1588F/image-size/large?v=v2&amp;amp;px=999" role="button" title="databricks.png" alt="databricks.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, I want to use the package in my pipeline. So I simply added&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from pipelinewithpackage import taxis&lt;/LI-CODE&gt;&lt;P&gt;before my&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/25059"&gt;@DP&lt;/a&gt;.table defintions. This is the only modificaiton which I did - the rest of the code is the generatedbundle code.&lt;/P&gt;&lt;P&gt;I deploy the bundle and run it: then i get the&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;ModuleNotFoundError: No module named 'pipelinewithpackage'&lt;/STRONG&gt; error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the cluster logs I can see, that the wheel is created:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Building wheels for collected packages: pipelinewithpackage
  Building editable for pipelinewithpackage (pyproject.toml): started
  Building editable for pipelinewithpackage (pyproject.toml): finished with status 'done'
  Created wheel for pipelinewithpackage: filename=pipelinewithpackage-0.0.1-py3-none-any.whl size=1433 sha256=492c44e0c2d9eb063b3f3c01a6fffe9d1699de5123a389a0e8b5708bbf61060c
Successfully built pipelinewithpackage
Installing collected packages: pipelinewithpackage
Successfully installed pipelinewithpackage-0.0.1&lt;/LI-CODE&gt;&lt;P&gt;Why isn't it finding the library?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Oct 2026 18:33:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/declarative-pipeline-with-editable-wheel-python-module-not-found/m-p/172599#M56658</guid>
      <dc:creator>a_user12</dc:creator>
      <dc:date>2026-10-10T18:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Declarative Pipeline with editable wheel: PYTHON.MODULE_NOT_FOUND_ERROR</title>
      <link>https://community.databricks.com/t5/data-engineering/declarative-pipeline-with-editable-wheel-python-module-not-found/m-p/172671#M56665</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110209"&gt;@a_user12&lt;/a&gt;, .&lt;/P&gt;
&lt;P&gt;Your bundle config is the documented pattern for pulling &lt;CODE&gt;pyproject.toml&lt;/CODE&gt; dependencies into a pipeline, so the setup itself is sound. The clue is the 1,433-byte wheel. An editable install doesn't copy your code into site-packages. It installs a small pointer telling Python which folder to add to &lt;CODE&gt;sys.path&lt;/CODE&gt;. So "Successfully installed" only means the pointer landed. If it points at the wrong folder, the import fails exactly the way you're seeing.&lt;/P&gt;
&lt;P&gt;Here's what I'd check:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Make sure &lt;CODE&gt;pyproject.toml&lt;/CODE&gt; points hatchling at the real package folder. Your layout should look like this:&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE class="language-text"&gt;src/
  pipelinewithpackage/
    __init__.py
    taxis.py
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class="language-toml"&gt;[tool.hatch.build.targets.wheel]
packages = ["src/pipelinewithpackage"]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;
&lt;P&gt;Prove the packaging works by building a regular (non-editable) wheel locally with &lt;CODE&gt;uv build --wheel&lt;/CODE&gt;, then run &lt;CODE&gt;unzip -l dist/*.whl&lt;/CODE&gt;. You should see &lt;CODE&gt;pipelinewithpackage/__init__.py&lt;/CODE&gt; and &lt;CODE&gt;pipelinewithpackage/taxis.py&lt;/CODE&gt;. If you only see &lt;CODE&gt;*.dist-info&lt;/CODE&gt; files, the config in step 1 is the culprit.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Confirm &lt;CODE&gt;pyproject.toml&lt;/CODE&gt; and &lt;CODE&gt;src/pipelinewithpackage/&lt;/CODE&gt; actually deployed under the path &lt;CODE&gt;${workspace.file_path}&lt;/CODE&gt; resolves to. The &lt;CODE&gt;libraries.glob&lt;/CODE&gt; entry only covers your transformation files. The editable install has to find the project metadata and the package folder on its own.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you'd rather skip packaging, you have two options. You can put the helper under the pipeline's &lt;CODE&gt;utilities&lt;/CODE&gt; folder and import it directly. Or you can pass the source path in and add it to &lt;CODE&gt;sys.path&lt;/CODE&gt; yourself:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-yaml"&gt;configuration:
  bundle.sourcePath: ${workspace.file_path}/src
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class="language-python"&gt;import sys
sys.path.append(spark.conf.get("bundle.sourcePath", "."))
from pipelinewithpackage import taxis
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;One caution: don't try to fix this with &lt;CODE&gt;%pip install&lt;/CODE&gt; or &lt;CODE&gt;dbutils.library.restartPython()&lt;/CODE&gt; inside the pipeline. Pipelines don't support either, and dependencies belong in the Environment settings.&lt;/P&gt;
&lt;P&gt;If it's still stubborn, paste your &lt;CODE&gt;pyproject.toml&lt;/CODE&gt; and folder tree as text and I'll take another look.&lt;/P&gt;
&lt;P&gt;References:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Bundle library dependencies: &lt;A href="https://docs.databricks.com/aws/en/dev-tools/bundles/library-dependencies" target="_blank"&gt;https://docs.databricks.com/aws/en/dev-tools/bundles/library-dependencies&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Manage Python dependencies for pipelines: &lt;A href="https://docs.databricks.com/aws/en/ldp/developer/external-dependencies" target="_blank"&gt;https://docs.databricks.com/aws/en/ldp/developer/external-dependencies&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Import Python modules from Git folders or workspace files: &lt;A href="https://docs.databricks.com/aws/en/ldp/import-workspace-files" target="_blank"&gt;https://docs.databricks.com/aws/en/ldp/import-workspace-files&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Develop pipelines with Declarative Automation Bundles: &lt;A href="https://docs.databricks.com/aws/en/dev-tools/bundles/pipelines-tutorial" target="_blank"&gt;https://docs.databricks.com/aws/en/dev-tools/bundles/pipelines-tutorial&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Regards, Louis.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Oct 2026 15:55:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/declarative-pipeline-with-editable-wheel-python-module-not-found/m-p/172671#M56665</guid>
      <dc:creator>Louis_Frolio</dc:creator>
      <dc:date>2026-10-11T15:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Declarative Pipeline with editable wheel: PYTHON.MODULE_NOT_FOUND_ERROR</title>
      <link>https://community.databricks.com/t5/data-engineering/declarative-pipeline-with-editable-wheel-python-module-not-found/m-p/172696#M56670</link>
      <description>&lt;P&gt;Hi - Thank you for your quick response.&lt;/P&gt;&lt;P&gt;I checked 1-3: everything seems to be fine:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I can build manually and see all files&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&lt;PRE&gt;workspace.file_path​&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class="lia-indent-padding-left-30px"&gt;contains the files&lt;/P&gt;&lt;P&gt;So I provide additional information.&lt;/P&gt;&lt;P&gt;Folder Tree&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ª   .gitignore
ª   AGENTS.md
ª   CLAUDE.md
ª   databricks.yml
ª   pyproject.toml
ª   README.md
ª   uv.lock
+---fixtures
ª       .gitkeep
ª       
+---resources
ª       pipelinewithpackage_etl.pipeline.yml
ª       
+---src
ª   ª   sample_notebook.ipynb
ª   ª   
ª   +---pipelinewithpackage
ª   ª       main.py
ª   ª       taxis.py
ª   ª       __init__.py
ª   ª       
ª   +---pipelinewithpackage_etl
ª       ª   README.md
ª       ª   
ª       +---explorations
ª       ª       sample_exploration.ipynb
ª       ª       
ª       +---transformations
ª               sample_trips_pipelinewithpackage.py
ª               sample_zones_pipelinewithpackage.py
ª               
+---tests
        conftest.py
        sample_taxis_test.py
        &lt;/LI-CODE&gt;&lt;P&gt;My Pipeline code (where I get the error):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;from pyspark import pipelines as dp
from pyspark.sql.functions import col

from pipelinewithpackage import taxis
# This file defines a sample transformation.
# Edit the sample below or add new transformations
# using "+ Add" in the file browser.


@dp.table
def sample_trips_pipelinewithpackage():
    return spark.read.table("samples.nyctaxi.trips")&lt;/LI-CODE&gt;&lt;P&gt;Pyproject.toml&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[project]
name = "pipelinewithpackage"
version = "0.0.1"
authors = [{ name = "xxxx" }]
requires-python = "&amp;gt;=3.10,&amp;lt;3.13"
dependencies = [
    # Any dependencies for jobs and pipelines in this project can be added here
    # See also https://docs.databricks.com/dev-tools/bundles/library-dependencies
    #
    # LIMITATION: for pipelines, dependencies are cached during development;
    # add dependencies to the 'environment' section of your pipeline.yml file instead
]

[dependency-groups]
dev = [
    "pytest",
    "ruff",
    "databricks-dlt",
    "databricks-connect&amp;gt;=15.4,&amp;lt;15.5",
    "ipykernel",
]

[tool.hatch.build.targets.wheel]
packages = ["src/pipelinewithpackage"]

[project.scripts]
main = "pipelinewithpackage.main:main"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.ruff]
line-length = 120&lt;/LI-CODE&gt;&lt;P&gt;Just FYI:&lt;BR /&gt;This is, how it looks in my settings&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Databricks2.png" style="width: 506px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/32006iC4DA629CA47DD7C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Databricks2.png" alt="Databricks2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Oct 2026 18:34:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/declarative-pipeline-with-editable-wheel-python-module-not-found/m-p/172696#M56670</guid>
      <dc:creator>a_user12</dc:creator>
      <dc:date>2026-10-11T18:34:28Z</dc:date>
    </item>
  </channel>
</rss>

