[PYTHON] Comment installer cx_Oracle sur macOS Sierra

Aperçu

Comment installer cx_Oracle, une bibliothèque pour se connecter à Oracle depuis Python.

environnement

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.12.3
BuildVersion:   16D32
$ python --version
Python 3.5.2 :: Anaconda 4.2.0 (x86_64)
$ pip --version
pip 9.0.1 from /Users/nobukatsu/.pyenv/versions/anaconda3-4.2.0/lib/python3.5/site-packages (python 3.5)

procédure

Téléchargement et déploiement instantanés du client

http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html

De la page ci-dessus

--instantclient-basic-macos.x64- [numéro de version] .zip --instantclient-sdk-macos.x64- [numéro de version] .zip

Téléchargez les deux, décompressez-les et placez-les dans un endroit approprié.

Exemple:

/Users/nobukatsu/devel/library/oracle/instantclient_12_1

Créer un lien symbolique

$ pwd
/Users/nobukatsu/devel/library/oracle/instantclient_12_1
$ ln -s libclntsh.dylib.12.1 libclntsh.dylib
$ ln -s libocci.dylib.12.1 libocci.dylib

Définir les variables d'environnement

Définissez les variables d'environnement dans .bash_profile etc.

export ORACLE_HOME=~/devel/library/oracle/instantclient_12_1
export PATH=$ORACLE_HOME:$PATH
export DYLD_LIBRARY_PATH=$ORACLE_HOME
export LD_LIBRARY_PATH=$ORACLE_HOME
export FORCE_RPATH=1

Installation de cx_Oracle

pip install --no-cache-dir cx_oracle

Vérification

Si aucune erreur ne se produit après l'exécution de ce qui suit, l'installation est réussie.

python -c "import cx_Oracle"

Recommended Posts

Comment installer cx_Oracle sur macOS Sierra
Comment installer Graph-Tool sur macOS
Comment installer mysql-connector-python sur Mac
Comment installer VMware-Tools sur Linux
Comment installer pycrypto sur Windows
Comment installer OpenCV sur Mac
Comment installer PyPy sur CentOS
Comment installer TensorFlow sur CentOS 7
Comment installer Maven sur CentOS
Comment installer Music 21 sur Windows
Installez Java2Python sur macOS High Sierra (10.13)
Comment installer aws-session-manager-plugin sur Manajro Linux
Comment installer drobertadams / toggl-cli sur Mac
Comment installer Richzhang / Colorisation sur Windows 10
Comment installer Apache (httpd) sur CentOS7
Comment installer Eclipse GlassFish 5.1.0 sur CentOS7
Comment installer Apache (httpd) sur CentOS8
Comment installer NumPy sur Raspeye
Comment installer Python
Comment installer python
Comment installer Nbextensions
Comment installer Prover9
[Version 2020] Comment installer Python3 sur EC2 d'AWS
Comment installer OpenCV sur Jetson Nano Python
Comment installer rapidement h5py sur Windows 10 [non officiel]
Comment installer Camunda Modeler sur Manjaro Linux
[Python] Comment installer OpenCV sur Anaconda [Windows]
Comment installer / vérifier Graphviz sur anaconda / windows10
[2020.8 dernière] Comment installer Python
Comment installer Python [Windows]
Comment créer rapidement un environnement d'analyse morphologique à l'aide d'Elasticsearch sur macOS Sierra
Comment installer Tabpy 1.0 (version 2020-01)
Comment installer Linux sur un PC UEFI 32 bits
Comment installer Git GUI et Gitk sur CentOS
Comment installer Caffe sur OS X avec macports
Comment s'inscrire auprès de pypi
Comment installer mkl numpy
[AWS EC2] Comment installer Maven sur Amazon Linux 2
Comment installer le blog Pelican
Comment installer git sur Linux tel que EC2
Comment installer Python2.7 python3.5 avec pyenv (sur RHEL5 CentOS5) (novembre 2016)
Comment installer Theano sur Mac OS X avec homebrew
Étapes pour installer MySQL 8.0 sur CentOS 8.1
Comment utiliser Dataiku sous Windows
Instructions pour installer matplotlib sur votre Mac
Remarques sur l'utilisation de pywinauto
Comment installer python-pip avec ubuntu20.04LTS
Étapes pour installer VirtualBox sur CentOS
Installez Scipy sur Mac OS Sierra
Comment déployer django-compresseur sous Windows
Comment exécuter matplotlib sur heroku
Comment installer MBDyn (Linux Ubuntu)
Comment utiliser l'homebrew dans Debian
Comment installer et configurer Blackbird
Comment installer et utiliser Graphviz
Comment installer mysql-connector avec pip3
Étapes pour installer python3 sur Mac