0
cx_Oracle 모듈을 사용하여 Python과 Oracle 데이터베이스를 연결하려고합니다. 지난 몇 시간 동안 설치하려고했는데 내 문제에 대한 답을 찾을 수 없습니다.Mac OSX Sierra Python 3.5.2 cx_oracle 설치가 실패했습니다.
하기로 cx_Oracle과를 설치하는 동안 : pip install cx_oracle
Collecting cx_oracle
Using cached cx_Oracle-5.2.1.tar.gz
Building wheels for collected packages: cx-oracle
Running setup.py bdist_wheel for cx-oracle ... error
Complete output from command /Users/dunker/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/x2/shhmzq692yx16cmgnmm8wgqm0000gn/T/pip-build-u1fc6kgz/cx-oracle/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /var/folders/x2/shhmzq692yx16cmgnmm8wgqm0000gn/T/tmpdol0yxgqpip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build/temp.macosx-10.6-x86_64-3.5-12c
/usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/dunker/anaconda3/include -arch x86_64 -I/Library/Oracle/instantclient_11_2/sdk/include -I/Users/dunker/anaconda3/include/python3.5m -c cx_Oracle.c -o build/temp.macosx-10.6-x86_64-3.5-12c/cx_Oracle.o -DBUILD_VERSION=5.2.1
In file included from cx_Oracle.c:203:
In file included from ./SessionPool.c:138:
In file included from ./Connection.c:761:
In file included from ./Cursor.c:246:
In file included from ./Variable.c:171:
./NumberVar.c:372:26: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
length = numDigits + abs(scale) + 3;
^
./NumberVar.c:372:26: note: use function 'labs' instead
length = numDigits + abs(scale) + 3;
^~~
labs
In file included from cx_Oracle.c:203:
In file included from ./SessionPool.c:138:
In file included from ./Connection.c:761:
In file included from ./Cursor.c:246:
In file included from ./Variable.c:176:
./ObjectVar.c:118:19: warning: comparison of integers of different signs: 'int' and 'ub4' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < self->allocatedElements; i++) {
~^~~~~~~~~~~~~~~~~~~~~~~~
./ObjectVar.c:135:19: warning: comparison of integers of different signs: 'int' and 'ub4' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < self->allocatedElements; i++) {
~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from cx_Oracle.c:203:
In file included from ./SessionPool.c:138:
In file included from ./Connection.c:761:
In file included from ./Cursor.c:246:
./Variable.c:926:32: warning: comparison of integers of different signs: 'ub4' (aka 'unsigned int') and 'int' [-Wsign-compare]
if (var->allocatedElements < cursor->fetchArraySize) {
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from cx_Oracle.c:203:
In file included from ./SessionPool.c:138:
In file included from ./Connection.c:761:
./Cursor.c:2440:19: warning: comparison of integers of different signs: 'int' and 'ub4' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < rowCountArraySize; i++) {
~^~~~~~~~~~~~~~~~~~
In file included from cx_Oracle.c:203:
In file included from ./SessionPool.c:138:
In file included from ./Connection.c:764:
./Subscription.c:451:19: warning: comparison of integers of different signs: 'ub4' (aka 'unsigned int') and 'sb4' (aka 'int') [-Wsign-compare]
for (i = 0; i < numRows; i++) {
~^~~~~~~~
./Subscription.c:526:19: warning: comparison of integers of different signs: 'ub4' (aka 'unsigned int') and 'sb4' (aka 'int') [-Wsign-compare]
for (i = 0; i < numTables; i++) {
~^~~~~~~~~~
./Subscription.c:618:23: warning: comparison of integers of different signs: 'ub4' (aka 'unsigned int') and 'sb4' (aka 'int') [-Wsign-compare]
for (i = 0; i < numTables; i++) {
~^~~~~~~~~~
./Subscription.c:660:23: warning: comparison of integers of different signs: 'ub4' (aka 'unsigned int') and 'sb4' (aka 'int') [-Wsign-compare]
for (i = 0; i < numQueries; i++) {
~^~~~~~~~~~~
**9 warnings generated.**
creating build/lib.macosx-10.6-x86_64-3.5-12c
/usr/bin/clang -bundle -undefined dynamic_lookup -L/Users/dunker/anaconda3/lib -arch x86_64 build/temp.macosx-10.6-x86_64-3.5-12c/cx_Oracle.o -L/Library/Oracle/instantclient_11_2 -L/Users/dunker/anaconda3/lib -lclntsh -o build/lib.macosx-10.6-x86_64-3.5-12c/cx_Oracle.cpython-35m-darwin.so -shared-libgcc
ld: library not found for -lclntsh
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Failed building wheel for cx-oracle
Running setup.py clean for cx-oracle
Failed to build cx-oracle
Installing collected packages: cx-oracle
Running setup.py install for cx-oracle ... error
Complete output from command /Users/dunker/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/x2/shhmzq692yx16cmgnmm8wgqm0000gn/T/pip-build-u1fc6kgz/cx-oracle/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/x2/shhmzq692yx16cmgnmm8wgqm0000gn/T/pip-jk8j3nz6-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build/temp.macosx-10.6-x86_64-3.5-12c
/usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/dunker/anaconda3/include -arch x86_64 -I/Library/Oracle/instantclient_11_2/sdk/include -I/Users/dunker/anaconda3/include/python3.5m -c cx_Oracle.c -o build/temp.macosx-10.6-x86_64-3.5-12c/cx_Oracle.o -DBUILD_VERSION=5.2.1
In file included from cx_Oracle.c:203:
In file included from ./SessionPool.c:138:
In file included from ./Connection.c:761:
In file included from ./Cursor.c:246:
In file included from ./Variable.c:171:
./NumberVar.c:372:26: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
length = numDigits + abs(scale) + 3;
^
./NumberVar.c:372:26: note: use function 'labs' instead
length = numDigits + abs(scale) + 3;
^~~
labs
In file included from cx_Oracle.c:203:
In file included from ./SessionPool.c:138:
In file included from ./Connection.c:761:
In file included from ./Cursor.c:246:
In file included from ./Variable.c:176:
./ObjectVar.c:118:19: warning: comparison of integers of different signs: 'int' and 'ub4' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < self->allocatedElements; i++) {
~^~~~~~~~~~~~~~~~~~~~~~~~
./ObjectVar.c:135:19: warning: comparison of integers of different signs: 'int' and 'ub4' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < self->allocatedElements; i++) {
~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from cx_Oracle.c:203:
In file included from ./SessionPool.c:138:
In file included from ./Connection.c:761:
In file included from ./Cursor.c:246:
./Variable.c:926:32: warning: comparison of integers of different signs: 'ub4' (aka 'unsigned int') and 'int' [-Wsign-compare]
if (var->allocatedElements < cursor->fetchArraySize) {
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from cx_Oracle.c:203:
In file included from ./SessionPool.c:138:
In file included from ./Connection.c:761:
./Cursor.c:2440:19: warning: comparison of integers of different signs: 'int' and 'ub4' (aka 'unsigned int') [-Wsign-compare]
for (i = 0; i < rowCountArraySize; i++) {
~^~~~~~~~~~~~~~~~~~
In file included from cx_Oracle.c:203:
In file included from ./SessionPool.c:138:
In file included from ./Connection.c:764:
./Subscription.c:451:19: warning: comparison of integers of different signs: 'ub4' (aka 'unsigned int') and 'sb4' (aka 'int') [-Wsign-compare]
for (i = 0; i < numRows; i++) {
~^~~~~~~~
./Subscription.c:526:19: warning: comparison of integers of different signs: 'ub4' (aka 'unsigned int') and 'sb4' (aka 'int') [-Wsign-compare]
for (i = 0; i < numTables; i++) {
~^~~~~~~~~~
./Subscription.c:618:23: warning: comparison of integers of different signs: 'ub4' (aka 'unsigned int') and 'sb4' (aka 'int') [-Wsign-compare]
for (i = 0; i < numTables; i++) {
~^~~~~~~~~~
./Subscription.c:660:23: warning: comparison of integers of different signs: 'ub4' (aka 'unsigned int') and 'sb4' (aka 'int') [-Wsign-compare]
for (i = 0; i < numQueries; i++) {
~^~~~~~~~~~~
9 warnings generated.
creating build/lib.macosx-10.6-x86_64-3.5-12c
/usr/bin/clang -bundle -undefined dynamic_lookup -L/Users/dunker/anaconda3/lib -arch x86_64 build/temp.macosx-10.6-x86_64-3.5-12c/cx_Oracle.o -L/Library/Oracle/instantclient_11_2 -L/Users/dunker/anaconda3/lib -lclntsh -o build/lib.macosx-10.6-x86_64-3.5-12c/cx_Oracle.cpython-35m-darwin.so -shared-libgcc
ld: library not found for -lclntsh
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit status 1
나는 오류 메시지의 종류를 얻을. 나는 10 개 이상의 튜토리얼을 따라했지만 대답을 찾지 못하는 것 같습니다. env 변수를 올바르게 설정하면 다른 모든 변수가 작동합니다. 좋아
예. 그 죄송합니다. – dummker
걱정 마시고 고맙습니다! – halfer