<?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 Re: Using private package, getting ERROR: No matching distribution found for myprivatepackage in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/using-private-package-getting-error-no-matching-distribution/m-p/57931#M2293</link>
    <description>&lt;P&gt;Hi, Does this look like a dependency error? All the dependencies are packed in the whl? Also, could you please confirm if all the limitations are satified? Refer:&amp;nbsp;&amp;nbsp;&lt;A href="https://docs.databricks.com/en/compute/access-mode-limitations.html" target="_blank"&gt;https://docs.databricks.com/en/compute/access-mode-limitations.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jan 2024 05:38:10 GMT</pubDate>
    <dc:creator>Debayan</dc:creator>
    <dc:date>2024-01-20T05:38:10Z</dc:date>
    <item>
      <title>Using private package, getting ERROR: No matching distribution found for myprivatepackage</title>
      <link>https://community.databricks.com/t5/get-started-discussions/using-private-package-getting-error-no-matching-distribution/m-p/57452#M2236</link>
      <description>&lt;P&gt;My project's setup.py file&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from setuptools import find_packages, setup

PACKAGE_REQUIREMENTS = ["pyyaml","confluent-kafka", "fastavro", "python-dotenv","boto3", "pyxlsb", "aiohttp", "myprivatepackage"]

LOCAL_REQUIREMENTS = ["delta-spark", "scikit-learn", "pandas", "mlflow", "databricks-sql-connector", "kafka-python"]

TEST_REQUIREMENTS = ["pytest", "coverage[toml]", "pytest-cov", "dbx&amp;gt;=0.7,&amp;lt;0.8"]

setup(
    name="my_project",
    packages=find_packages(exclude=["tests", "tests.*"]),
    setup_requires=["setuptools","wheel"],
    install_requires=PACKAGE_REQUIREMENTS,
    extras_require={"local": LOCAL_REQUIREMENTS, "test": TEST_REQUIREMENTS},
    entry_points = {
        "console_scripts": [
            "etl = my_project.tasks.sample_etl_task:entrypoint"
        ]
    },
    version=__version__,
    description="My project",
    author="me",
)&lt;/LI-CODE&gt;&lt;P&gt;I am using dbx to deploy so here is how my deployment.yaml looks like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;environments:
  dev:
    workflows:
      - name: "mytask"  
        tasks:
          - task_key: "mytask"
            new_cluster:
              spark_version: "14.2.x-scala2.12"
              node_type_id: "r5d.large"
              data_security_mode: "SINGLE_USER"
              spark_conf:
                spark.databricks.delta.preview.enabled: 'true'
                spark.databricks.cluster.profile: 'singleNode'
                spark.master: 'local[*, 4]'
              runtime_engine: STANDARD
              num_workers: 0  
            spark_python_task:
              python_file: "file://my_project/entity/mytask/tasks/mytask.py"&lt;/LI-CODE&gt;&lt;P&gt;Then I run the following command to deploy&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dbx deploy --deployment-file ./conf/dev/deployment.yml -e dev&lt;/LI-CODE&gt;&lt;P&gt;It deploys fine. No errors!&lt;BR /&gt;But when I run the job, I get the following error&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/local_disk0/.ephemeral_nfs/cluster_libraries/python/bin/pip install --upgrade /local_disk0/tmp/abc/[REDACTED]-0.8.0-py3-none-any.whl --disable-pip-version-check) exited with code 1, and Processing /local_disk0/tmp/abc/[REDACTED]-0.8.0-py3-none-any.whl
24/01/16 12:13:43 INFO SharedDriverContext: Failed to attach library dbfs:/Shared/dbx/projects/[REDACTED]/abc/artifacts/dist/[REDACTED]-0.8.0-py3-none-any.whl to Spark
java.lang.Throwable: Process List(/bin/su, libraries, -c, bash /local_disk0/.ephemeral_nfs/cluster_libraries/python/python_start_clusterwide.sh /local_disk0/.ephemeral_nfs/cluster_libraries/python/bin/pip install --upgrade /local_disk0/tmp/abc/[REDACTED]-0.8.0-py3-none-any.whl --disable-pip-version-check) exited with code 1. ERROR: Could not find a version that satisfies the requirement myprivatepackage (from [REDACTED]) (from versions: none)
ERROR: No matching distribution found for myprivatepackage&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;How do I resolve this?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 13:17:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/using-private-package-getting-error-no-matching-distribution/m-p/57452#M2236</guid>
      <dc:creator>vinitkhandelwal</dc:creator>
      <dc:date>2024-01-16T13:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using private package, getting ERROR: No matching distribution found for myprivatepackage</title>
      <link>https://community.databricks.com/t5/get-started-discussions/using-private-package-getting-error-no-matching-distribution/m-p/57931#M2293</link>
      <description>&lt;P&gt;Hi, Does this look like a dependency error? All the dependencies are packed in the whl? Also, could you please confirm if all the limitations are satified? Refer:&amp;nbsp;&amp;nbsp;&lt;A href="https://docs.databricks.com/en/compute/access-mode-limitations.html" target="_blank"&gt;https://docs.databricks.com/en/compute/access-mode-limitations.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 05:38:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/using-private-package-getting-error-no-matching-distribution/m-p/57931#M2293</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2024-01-20T05:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using private package, getting ERROR: No matching distribution found for myprivatepackage</title>
      <link>https://community.databricks.com/t5/get-started-discussions/using-private-package-getting-error-no-matching-distribution/m-p/76641#M3200</link>
      <description>&lt;P&gt;I added init script to compute in order to add details of private package login in /etc/pip.conf&lt;/P&gt;&lt;P&gt;Something as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;resource "databricks_workspace_file" "gitlab_pypi_init_script" {
  provider = databricks.workspace
  content_base64 = base64encode(&amp;lt;&amp;lt;-EOT
    #!/bin/bash
    if [[ $PYPI_TOKEN ]]; then
    use $PYPI_TOKEN
    fi
    echo $PYPI_TOKEN
    printf "[global]\n" &amp;gt; /etc/pip.conf
    printf "extra-index-url =\n" &amp;gt;&amp;gt; /etc/pip.conf
    printf "\thttps://__token__:$PYPI_TOKEN@gitlab.com/api/v4/projects/12345678/packages/pypi/simple\n" &amp;gt;&amp;gt; /etc/pip.conf
    EOT
  )
  path = "/FileStore/gitlab_pypi_init_script.sh"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I added this file to Workspace and then referenced it under init scripts in cluster compute and it worked to install private package in the cluster when it starts&lt;/P&gt;&lt;P&gt;I also made sure gitlab token was accessible with variable PYPI_TOKEN using Spark environment variables&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 15:33:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/using-private-package-getting-error-no-matching-distribution/m-p/76641#M3200</guid>
      <dc:creator>vinitkhandelwal</dc:creator>
      <dc:date>2024-07-03T15:33:54Z</dc:date>
    </item>
  </channel>
</rss>

