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

How do I solve this error in my Databricks Apps when using the pyodbc library? I have used an init scri

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:

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744653714a4586054.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信