在32位Anaconda上安装cx_Oracle:平台的LONG_BIT定义似乎错误

问题描述 投票:0回答:1

我在64位计算机上,但是需要支持旧的32位专有系统。

我安装了miniconda 32位版本3.7.1,以及32位oracle客户端。我的ORACLE_HOMELD_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克隆一个较旧的版本(例如cx_Oracle 5.3,然后运行python setup.py install,则同样如此)。

如何在32位miniconda安装上安装32位cx_Oracle?

我在64位计算机上,但是需要支持旧的32位专有系统。我安装了miniconda 32位版本3.7.1,以及32位oracle客户端。我的ORACLE_HOME和...

python-3.x anaconda cx-oracle miniconda
1个回答
0
投票

使用conda安装(位于pip旁边的miniconda的bin目录中)。

© www.soinside.com 2019 - 2024. All rights reserved.