Package : cx_Oracle for Python 3.5, windows64 bit. Oracle 11.2.0.1.0

拟墨画扇 提交于 2019-12-06 11:41:30

问题


I am trying to install cx_Oracle on my windows PC. I ran following command in command prompt:

pip install cx_Oracle

This is giving me the following error:

Collecting cx-Oracle
Could not find a version that satisfies the requirement cx-Oracle (from versions: )
No matching distribution found for cx-Oracle

I am using windows 64bit machine and Python 3.5(Anaconda3). Intsalled Oracle vcersion on my PC is Oracle 11.2.0.1.0 and oracle-instantclient version oracle-instantclient-11.2.0.4.0-0

Please let me know what am I missing. Should I downgrade my python version to 3.4? If yes, than how to do it using command line in Anaconda?


回答1:


I got past this issue by following these steps:

Create a Python 3.4 environment

Windows + R to open Run

Type 'cmd' (no apostrophes) and hit enter to open the command prompt.

Type the following:

$ conda create -n py34 python=3.4 anaconda

Activate and update the new environment

$ activate py34    
$ conda update conda

Uninstall and reinstall the qt aspect of Spyder

This step fixes a qt issue with Spyder when trying to open from your py34 environment

$ conda remove qt --name py34 
$ conda install qt=4.8.7=vc10_4

To Test

Make sure you have your py34 environment activated.

$ spyder # will launch spyder

In the Interactive Console in Spyder type:

$ import cx_Oracle # the O in Oracle must be capitalized

If it doesn't error out, you're done!

My solutions were found mostly based on the following postings:

http://conda.pydata.org/docs/py2or3.html
https://github.com/spyder-ide/spyder/issues/2858




回答2:


Python 3.5 binaries of cx_Oracle were made available on January 18. See here:

https://pypi.python.org/pypi/cx_Oracle/



来源:https://stackoverflow.com/questions/34610275/package-cx-oracle-for-python-3-5-windows64-bit-oracle-11-2-0-1-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!