我有这个python代码:
#!/usr/bin/env python
import pyodbc
from pandas import *
conn = pyodbc.connect("DSN=drill64", autocommit=True)
cursor = conn.cursor()
在作为.py文件运行时运行ipython笔记本,给出了以下错误
Traceback (most recent call last):
File "/home/ubuntu/TestingDrillQuery.py", line 14, in <module>
conn = pyodbc.connect("DSN=drill64", autocommit=True)
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/mapr/drillodbc/lib/64/libmaprdrillodbc64.so' : file not found (0) (SQLDriverConnect)")
[Finished in 0.4s with exit code 1]
通过终端python运行一切顺利,任何建议都值得赞赏。
答案 0 :(得分:0)
好的,我可以通过更改.py文件的权限来解决它
chmod +x TestingDrillQuery.py