问题描述
我想完成的事情:
- 在Jupyter Notebook中执行 import pyodbc 语句,从而使用pyodbc从sql数据库(例如SQL Server,Exasol等)导入数据.
- execute import pyodbc statement within Jupyter Notebook and thus use pyodbc to import data from sql databases such as SQL Server, Exasol, etc.
什么是环境:
- 在Windows 10-64位版本上安装的
- Anaconda3(py36_0) 通过conda安装的
- pyodbc( conda install pyodbc )->作为 conda列表的工作方式表明安装了pyodbc 4.0.16 py36_0
- jupyter笔记本可以正常工作,例如 import pandas 可以正常工作
- Anaconda3 (py36_0) installed on Windows 10 - 64 bit Version
- pyodbc installed via conda (conda install pyodbc) -> this worked as conda list shows that pyodbc 4.0.16 py36_0 is installed
- jupyter notebook works, for example import pandas works fine
会发生什么:
-
在jupyter笔记本中发出命令 import pyodbc 后,出现以下错误消息:
after issuing the command import pyodbc within the jupyter notebook, the following error message appears:
ImportError跟踪(最近一次通话最后一次) 在 ()----> 1导入pyodbcImportError:DLL加载失败:Angegebene Prozedur wurde nicht gefunden.
ImportError Traceback (most recent call last) in ()----> 1 import pyodbcImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.
在此先感谢您提供任何有帮助的答案!
Thanks in advance for any helpful answer!
推荐答案
我遇到了同样的问题.我认为Anaconda与最新的pyodbc版本不兼容. (请参见其网站: https://docs.continuum.io/anaconda/pkg-docs列出了对Python 3.6的3.0.10版支持)
I had the same problem. I don't think Anaconda is compatible with the latest pyodbc version. (see their website: https://docs.continuum.io/anaconda/pkg-docs which lists version 3.0.10 support for python 3.6)
我可以通过使用以下命令降级我的软件包来解决此问题:
I was able to solve this by downgrading my package using this command:
conda install -c anaconda pyodbc=3.0.10
这对我的测试很有帮助.希望这可以帮助.请告诉我是否可以!
This worked for me in my tests. Hope this helps. Please let me know if it does!
这篇关于当执行“导入pyodbc"时python 3.6(anaconda3)中的Jupyter Notebook引发错误:ImportError:DLL加载失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!