我在使用即时客户端时遇到问题。我按照http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html#ic_osx_inst中的确切说明在macOS 上安装 Instant Client 11.2。
但是,在命令行中启动服务器时,它返回以下错误: DatabaseError: DPI-1047: 64-bit Oracle Client library cannot be loaded: "dlopen(libclntsh.dylib,
你的 Python 版本是多少?它是 32 位还是 64 位? 64 位
您的 cx_Oracle 版本是多少? 截至今天的最新版本,我相信它是6.4.1
究竟是什么命令导致了问题(例如,您尝试使用什么命令进行安装)? 执行此命令“python manage.py”以运行应用程序时
您看到了什么错误?
DatabaseError:DPI-1047:无法加载 64 位 Oracle 客户端库:“dlopen(libclntsh.dylib, 1): image not found”。请参阅https://oracle.github.io/odpi/doc/installation.html#macos
在我的 bash 个人资料中,我建立了这些:
export PATH="/usr/local/mysql/bin:$PATH"
export PATH=/usr/local/sbin:/usr/local/bin:$PATH
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc
export WORKON_HOME=$HOME/Virtualenvs
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
export VIRTUALENVWRAPPER_PYTHON=/usr/local/Cellar/python@2/2.7.15_1/bin/python2.7
export VIRTUALENVWRAPPER_VIRTUALENV=usr/local/Cellar/python@2/2.7.15_1/bin/virtualenv
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
export TNS_ADMIN=/usr/local/oracle/instantclient_11_2
source /usr/local/bin/virtualenvwrapper.sh
export PATH="/usr/local/opt/gettext/bin:$PATH"
if [ -f $(brew --prefix)/etc/bash_completion ]; then
source $(brew --prefix)/etc/bash_completion
fi
export PATH=~/instantclient_11_2:$PATH
# Setting PATH for Python 2.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH