【发布时间】:2019-12-10 00:45:14
【问题描述】:
我使用的是 64 位机器,但需要支持旧的 32 位专有系统。
我安装了 miniconda 32 位版本 3.7.1,以及 32 位 oracle 客户端。我的ORACLE_HOME 和LD_LIBRARY_PATH 指向正确的32 位oracle 客户端。
我无法安装 64 位 python,因为我需要与 32 位旧版 C 库进行交互。
看起来 miniconda 的 pip 正在尝试安装 64 位 cx_Oracle,即使它是 32 位 python 安装。
pip install cx_Oracle 导致以下错误(编辑:以及python -m pip install cx_Oracle):
running bdist_wheel
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
creating build/temp.linux-x86_64-3.7/odpi
creating build/temp.linux-x86_64-3.7/odpi/src
gcc -pthread -B /path/to/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DCXO_BUILD_VERSION=7.3.0 -Iodpi/include -Iodpi/src -I/path/to/miniconda3/include/python3.7m -c src/cxoBuffer.c -o build/temp.linux-x86_64-3.7/src/cxoBuffer.o
/path/to/miniconda3/include/python3.7m/pyport.h:699:2: error:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
error: command 'gcc' failed with exit status 1
似乎 pip 正在尝试安装 64 位 cx_Oracle,即使这是 32 位 python。例如pip install cx_Oracle 命令显示x86_64 并且没有使用-m32 来构建。
如果我 git clone 像 cx_Oracle 5.3 这样的旧版本并运行 python setup.py install,情况也是如此。
如何在 32 位 miniconda 安装上安装 32 位 cx_Oracle?
【问题讨论】:
标签: python-3.x anaconda cx-oracle miniconda