oracle / oci-cli

Command Line Interface for Oracle Cloud Infrastructure
https://cloud.oracle.com/cloud-infrastructure
Other
442 stars 185 forks source link

CLI install failure on Mac OS when installing CLI with optional feature "db" (cxOracle package) and python 2.7 #147

Closed viralmodi closed 5 years ago

viralmodi commented 5 years ago

CLI install failure OS : MAC VER 10.13.6 (High Sierra) Python version used 2.7

The error seen is as pasted below:

Last login: Fri Mar 8 15:34:43 on console rafranco-mac:~ rafranco$ bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 6283 100 6283 0 0 3755 0 0:00:01 0:00:01 -::- 3755 Downloading Oracle Cloud Infrastructure CLI install script from https://raw.githubusercontent.com/oracle/oci-cli/6dc61e3b5fd2781c5afff2decb532c24969fa6bf/scripts/install/install.py to /var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/oci_cli_install_tmp_XXXX.vLoBVwzj.

100.0% Python3 not found on system PATH Running install script. python /var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/oci_cli_install_tmp_XXXX.vLoBVwzj < /dev/tty Verifying Python version. Python version 2.7.10 okay. .... .... .... .... .... .... .... ....

Building wheels for collected packages: configparser, arrow, cx-Oracle, terminaltables, PyYAML, retrying, pycparser Building wheel for configparser (setup.py) ... done Stored in directory: /var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/tmp8LbW2d/wheels/a3/61/79/424ef897a2f3b14684a7de5d89e8600b460b89663e6ce9d17c Building wheel for arrow (setup.py) ... done Stored in directory: /var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/tmp8LbW2d/wheels/ce/4f/95/64541c7466fd88ffe72fda5164f8323c91d695c9a77072c574 Building wheel for cx-Oracle (setup.py) ... error Complete output from command /Users/rafranco/lib/oracle-cli/bin/python -u -c "import setuptools, tokenize;_file='/private/var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/pip-install-N5yLQp/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 /private/var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/pip-wheel-5NoScm --python-tag cp27: running bdist_wheel running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.macosx-10.13-intel-2.7 creating build/temp.macosx-10.13-intel-2.7/src creating build/temp.macosx-10.13-intel-2.7/odpi creating build/temp.macosx-10.13-intel-2.7/odpi/src cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DCXO_BUILD_VERSION=7.0.0 -Iodpi/include -Iodpi/src -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/cxoBuffer.c -o build/temp.macosx-10.13-intel-2.7/src/cxoBuffer.o xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools. error: command 'cc' failed with exit status 1


Command "/Users/rafranco/lib/oracle-cli/bin/python -u -c "import setuptools, tokenize;_file='/private/var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/pip-install-N5yLQp/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 /private/var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/pip-record-d0UzVz/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rafranco/lib/oracle-cli/include/site/python2.7/cx-Oracle" failed with error code 1 in /private/var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/pip-install-N5yLQp/cx-Oracle/ Traceback (most recent call last): File "/var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/oci_cli_install_tmp_XXXX.vLoBVwzj", line 541, in main() File "/var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/oci_cli_install_tmp_XXXX.vLoBVwzj", line 498, in main install_cli(install_dir, tmp_dir) File "/var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/oci_cli_install_tmp_XXXX.vLoBVwzj", line 187, in install_cli exec_command(cmd, env=env) File "/var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/oci_cli_install_tmp_XXXX.vLoBVwzj", line 108, in exec_command subprocess.check_call(command_list, cwd=cwd, env=env) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/Users/rafranco/lib/oracle-cli/bin/pip', 'install', '--cache-dir', '/var/folders/y6/37_30_w120d7sx1xrvzp30k00000gn/T/tmp8LbW2d', 'oci_cli', '--upgrade']' returned non-zero exit status 1

viralmodi commented 5 years ago

This issue was resolved by the customer as follows:

Upgrade the python version to python 3.x (and install the related SSL certificates). Generally using brew install will install the certificates automatically when upgrading to a newer python version. brew install python3