cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks App deployment fails: mysqlclient build error (pkg-config not found)

vamsi_simbus
New Contributor III

 

Hi Community Members,

I’m deploying a Python project as a Databricks App, but deployment fails during dependency installation with:

 

ERROR: Failed to build 'MySQL client' pkg-config: not found Exception: Can not find valid pkg-config name

The dependency is pulled indirectly via:

 

ibis-framework[MySQL]

From my understanding, Databricks Apps don’t allow OS-level dependencies, and MySQL client requires native MySQL/MariaDB libraries—so pip fails when trying to build it from source.

Questions:

  1. Are there any supported workarounds for native dependencies in Databricks Apps?

    Thanks in advance for your help!

2 REPLIES 2

vamsi_simbus
New Contributor III

Hi All,

I’m still looking for guidance on this issue and haven’t been able to find a solution yet. If anyone has encountered something similar or has suggestions on how I can troubleshoot this further, I’d really appreciate your help.

Please let me know if more details, logs, or code snippets would be helpful — I can share whatever is needed.

Thanks !

aleksandra_ch
Databricks Employee
Databricks Employee

Hi @vamsi_simbus ,

Databricks Apps don’t yet support installing OS-level packages (apt-get, pkg-config, native client libs).

Could you try to install a Python native MySQL client as a backend of ibis:

  1. Install the core framework only: ibis-framework
  2. Install the mysql connector: PyMySQL
  3.  When you connect, you must explicitly tell Ibis to use the pymysql driver by adding it to the connection URL. This prevents Ibis from looking for the default system-level drivers:
    import ibis
    
    # Format: mysql+pymysql://user:pass@host:port/database
    con = ibis.connect("mysql+pymysql://root:password@localhost:3306/my_db")​

Please let me know if it helps.

Best regards,