最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Databricks App Error - libodbc.so.2: cannot open shared object file: No such file or directory - Stack Overflow

programmeradmin8浏览0评论

How do I solve this error in my Databricks Apps when using the pyodbc library? I have used an init script to install the library in my cluster, which has resolved the issue in Notebooks. However, the problem persists in Apps. I have used the following commands in my init script:

sudo apt-get update
sudo apt-get install -y libodbc2
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18

How do I solve this error in my Databricks Apps when using the pyodbc library? I have used an init script to install the library in my cluster, which has resolved the issue in Notebooks. However, the problem persists in Apps. I have used the following commands in my init script:

sudo apt-get update
sudo apt-get install -y libodbc2
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
Share Improve this question asked Mar 14 at 13:32 Obirieni SimeoObirieni Simeo 998 bronze badges 1
  • Can you provide the exact error message? – Rakesh Govindula Commented Mar 21 at 12:40
Add a comment  | 

1 Answer 1

Reset to default 0

I have tried the below code to install:

You can try the below at your end:

dbutils.fs.put("/databricks/init/<YourClusterName>/pyodbc-install.sh","""
#!/bin/bash
sudo apt-get update
sudo apt-get -q -y install unixodbc unixodbc-dev
sudo apt-get -q -y install python3-dev
/databricks/python/bin/pip install pyodbc
""", True)
  • Restart the cluster and then import pyodbc in your code.

Results:

发布评论

评论列表(0)

  1. 暂无评论