Search code examples
pythonazureazure-synapse

Adding Custom Python library in Azure Synapse


I have spinned up a notebook in Azure Synapse workbook and I have attached an Apache Spark pool and I am installing my python sdk in there by running command in first block of my notebook with code as "from XYZ import XYZ.client" but I get error as

"Module "XYZ" not found error.

How do i fix this? I have the python wheel package of XYZ with me. can someone guide me the steps in Azure Synapse


Solution

  • Easy way to install package for use in that notebook is to run

    %pip install XYZ
    

    Then you can import the package.

     from XYZ import XYZ.client
    

    See this answer