前言
使用Python进行数据建模时用到Oracle数据库,开发机用的是MacBook。在此之前并没有过Mac下使用Oracle数据库的经历,查过官网资料,配置比较复杂。
Installation
Installing Instant Client 12.2 on macOS
Instant Client 12.2 supports macOS High Sierra, Sierra and El Capitan.
Download the desired Instant Client ZIP files. All installations require the Basic or Basic Light package.
Unzip the packages into a single directory such as ~/instantclient_12_2 that is accessible to your application. For example:
cd ~
unzip instantclient-basic-macos.x64-12.2.0.1.0.zip
Add links to $HOME/lib or /usr/local/lib to enable applications to find the libraries. For example, OCI based applications could do:
mkdir ~/lib
ln -s ~/instantclient_12_2/libclntsh.dylib ~/lib/
ln -s ~/instantclient_12_2/libclntsh.dylib.12.1 ~/lib/
Alternatively, copy the required libraries. For example, to use OCI application