anaconda添加cx_Oracle,Anaconda 3.5 (64bit Windows) Install cx_Oracle

It's kind of non-trivial. However doable. Follow these steps:

1) Download Oracle Instant client for Windows x64 from

e.g. choose client e.g. 11.2.0.4

-> instantclient-basic-windows.x64-11.2.0.4.0.zip

-> instantclient-sdk-windows.x64-12.1.0.2.0.zip

2) Create directory and unzip the client & sdk in there:

e.g. c:\ora\11gx64

3) Set ORACLE_HOME and TNS_ADMIN

e.g. ORACLE_HOME=c:\ora\11gx64

and TNS_ADMIN=c:\ora\11gx64

also add %ORACLE_HOME% in Your %PATH%

4) In the created directory put file tnsnames.ora and fill with connection string to db:

%ORACLE_HOME%**tnsnames.ora** XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) )

-> replace 127.0.0.1 with your hostname

-> replace XE with your SID

5) I suppose You've got already Python installed.

-> Otherwise visit Download page for Python

-> Install python (3.6.1 in the time of writting)

-> execute python get-pip.py

6) Download and Install Visual C++ 2015 Build Tools

-> Search for Visual C++ 2015 Build Tools -> Install visualcppbuildtools_full.exe

7) Use pip to install cx_oracle pip install cx_oracle

(in the time of writing there is trouble with default installed version 5.3 so the Version 6.0b2 has to be installed) python -m pip install cx_Oracle --pre

The first steps are universal in my honest opinion for both conda and pip.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值