我需要在Python Anaconda3-2.5.0-Windows-x86_64中连接到Oracle数据库.通过以下方式安装cx_Oracle模块:
conda install -c https://conda.anaconda.org/anaconda cx_oracle
以下输出失败(修剪):
Hint: the following packages conflict with each other:
- cx_oracle
- python 3.5*
所以我尝试从https://pypi.python.org/pypi/cx_Oracle/开始通过’cx_Oracle-5.2.1-11g.win-amd64-py3.5.exe’来安装Python 3.5的软件包.这似乎有用(不知何故).甚至’conda list’命令打印行:
cx-oracle 5.2.1
但是当我输入import cx_Oracle时;然后在Python中
ImportError: DLL load failed: Uvedený modul nebyl nalezen.
出现.最后一个本地化部分的粗略翻译是“未找到模块”.
如何安装cx_Oracle模块?或者有没有其他方法可以连接到Oracle数据库?
解决方法:
我假设你只安装了windows和python 3.5.检查你的anaconda只是为了确保你使用anaconda3或anaconda设置python3环境.假设所有检查结果并且您仍然遇到相同的错误,请尝试从pip重新安装cx_oracle.
在您的Windows机器上打开cmd并键入pip install cx_Oracle,它应该很好地安装.如果你偶然安装了python2,你可能想做python3 -m pip install cx_Oracle.安装完成后你应该好好去.
标签:python,python-3-x,oracle,anaconda,conda
来源: https://codeday.me/bug/20190623/1270177.html