我正在尝试在Windows PC上安装cx_Oracle。我在命令提示符下运行以下命令:
pip install cx_Oracle
这给了我以下错误:
Collecting cx-Oracle
Could not find a version that satisfies the requirement cx-Oracle (from versions: )
No matching distribution found for cx-Oracle
我正在使用Windows 64位计算机和Python 3.5(Anaconda3)。我的PC上已安装的Oracle vcersion是Oracle 11.2.0.1.0和oracle-instantclient版本oracle-instantclient-11.2.0.4.0-0
请让我知道我在想什么。我应该将python版本降级到3.4吗?如果是的话,那么如何在Anaconda中使用命令行呢?
通过执行以下步骤,我克服了这个问题:
创建一个Python 3.4环境
Windows + R打开运行
键入“ cmd” (没有撇号),然后按Enter键以打开命令提示符。
输入以下内容:
$ conda create -n py34 python=3.4 anaconda
激活并更新新环境
$ activate py34
$ conda update conda
卸载并重新安装Spyder的qt方面
当您尝试从py34环境中打开时,此步骤解决了Spyder的qt问题
$ conda remove qt --name py34
$ conda install qt=4.8.7=vc10_4
去测试
确保已激活py34环境。
$ spyder # will launch spyder
在Spyder的Interactive Console中,输入:
$ import cx_Oracle # the O in Oracle must be capitalized
如果没有出错,那么您就完成了!
我的解决方案主要是根据以下发布发现的:
http://conda.pydata.org/docs/py2or3.html
https://github.com/spyder-ide/spyder/issues/2858
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句