aerospike / aerospike-client-python

Aerospike Python Client
Apache License 2.0
133 stars 110 forks source link

Can't install : OSX 10.11 #98

Open bbulkow opened 8 years ago

bbulkow commented 8 years ago

Followed the basic instructions. Took the command line, then sudo pip install aerospike

Here's my python:

Toughshit:~$ python --version Python 2.7.10

Here's the last bit of the compile log:

running install_lib

copying build/lib.macosx-10.11-intel-2.7/aerospike.so -> /Library/Python/2.7/site-packages

running install_data

creating /System/Library/Frameworks/Python.framework/Versions/2.7/aerospike

error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/aerospike': Operation not permitted


Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;file='/private/tmp/pip_build_root/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-0yzHSD-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/aerospike Traceback (most recent call last): File "/usr/local/bin/pip", line 9, in load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/init.py", line 185, in main return command.main(cmd_args) File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 161, in main text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 8: ordinal not in range(128) Toughshit:~/dev/www.aerospike.com$

rbotzer commented 8 years ago

This is a repeat of #53 and there's a lot of information there . Try to upgrade to the latest version of pip if you're on OS X, then use pip install --no-cache-dir aerospike

bbulkow commented 8 years ago

Fails when doing a python setup.py install on my machine, too. My machine isn't "virgin", I tend to install things from 'brew only, feel free to ask anything you like about the config.

cc -fno-strict-aliasing -fno-common -dynamic -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 -pipe -arch x86_64 -Isrc/include -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/main/global_hosts/type.c -o build/temp.macosx-10.11-intel-2.7/src/main/global_hosts/type.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -Wno-strict-prototypes -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -D_DARWIN_UNLIMITED_SELECT -DMARCH_x86_64 cc -fno-strict-aliasing -fno-common -dynamic -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 -pipe -arch x86_64 -Isrc/include -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/main/nullobject/type.c -o build/temp.macosx-10.11-intel-2.7/src/main/nullobject/type.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -Wno-strict-prototypes -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -D_DARWIN_UNLIMITED_SELECT -DMARCH_x86_64 creating build/lib.macosx-10.11-intel-2.7 cc -bundle -undefined dynamic_lookup -Wl,-F. -arch x86_64 build/temp.macosx-10.11-intel-2.7/src/main/aerospike.o build/temp.macosx-10.11-intel-2.7/src/main/exception.o build/temp.macosx-10.11-intel-2.7/src/main/log.o build/temp.macosx-10.11-intel-2.7/src/main/client/type.o build/temp.macosx-10.11-intel-2.7/src/main/client/apply.o build/temp.macosx-10.11-intel-2.7/src/main/client/close.o build/temp.macosx-10.11-intel-2.7/src/main/client/connect.o build/temp.macosx-10.11-intel-2.7/src/main/client/exists.o build/temp.macosx-10.11-intel-2.7/src/main/client/exists_many.o build/temp.macosx-10.11-intel-2.7/src/main/client/get.o build/temp.macosx-10.11-intel-2.7/src/main/client/get_many.o build/temp.macosx-10.11-intel-2.7/src/main/client/select_many.o build/temp.macosx-10.11-intel-2.7/src/main/client/info_node.o build/temp.macosx-10.11-intel-2.7/src/main/client/info.o build/temp.macosx-10.11-intel-2.7/src/main/client/key.o build/temp.macosx-10.11-intel-2.7/src/main/client/put.o build/temp.macosx-10.11-intel-2.7/src/main/client/operate.o build/temp.macosx-10.11-intel-2.7/src/main/client/query.o build/temp.macosx-10.11-intel-2.7/src/main/client/remove.o build/temp.macosx-10.11-intel-2.7/src/main/client/scan.o build/temp.macosx-10.11-intel-2.7/src/main/client/select.o build/temp.macosx-10.11-intel-2.7/src/main/client/admin.o build/temp.macosx-10.11-intel-2.7/src/main/client/udf.o build/temp.macosx-10.11-intel-2.7/src/main/client/sec_index.o build/temp.macosx-10.11-intel-2.7/src/main/serializer.o build/temp.macosx-10.11-intel-2.7/src/main/client/remove_bin.o build/temp.macosx-10.11-intel-2.7/src/main/client/get_key_digest.o build/temp.macosx-10.11-intel-2.7/src/main/client/lstack.o build/temp.macosx-10.11-intel-2.7/src/main/client/lset.o build/temp.macosx-10.11-intel-2.7/src/main/client/lmap.o build/temp.macosx-10.11-intel-2.7/src/main/client/llist.o build/temp.macosx-10.11-intel-2.7/src/main/key/type.o build/temp.macosx-10.11-intel-2.7/src/main/key/apply.o build/temp.macosx-10.11-intel-2.7/src/main/key/exists.o build/temp.macosx-10.11-intel-2.7/src/main/key/get.o build/temp.macosx-10.11-intel-2.7/src/main/key/put.o build/temp.macosx-10.11-intel-2.7/src/main/key/remove.o build/temp.macosx-10.11-intel-2.7/src/main/query/type.o build/temp.macosx-10.11-intel-2.7/src/main/query/apply.o build/temp.macosx-10.11-intel-2.7/src/main/query/foreach.o build/temp.macosx-10.11-intel-2.7/src/main/query/results.o build/temp.macosx-10.11-intel-2.7/src/main/query/select.o build/temp.macosx-10.11-intel-2.7/src/main/query/where.o build/temp.macosx-10.11-intel-2.7/src/main/scan/type.o build/temp.macosx-10.11-intel-2.7/src/main/scan/foreach.o build/temp.macosx-10.11-intel-2.7/src/main/scan/results.o build/temp.macosx-10.11-intel-2.7/src/main/scan/select.o build/temp.macosx-10.11-intel-2.7/src/main/lstack/type.o build/temp.macosx-10.11-intel-2.7/src/main/lstack/lstack_operations.o build/temp.macosx-10.11-intel-2.7/src/main/lset/type.o build/temp.macosx-10.11-intel-2.7/src/main/lset/lset_operations.o build/temp.macosx-10.11-intel-2.7/src/main/llist/type.o build/temp.macosx-10.11-intel-2.7/src/main/llist/llist_operations.o build/temp.macosx-10.11-intel-2.7/src/main/lmap/type.o build/temp.macosx-10.11-intel-2.7/src/main/lmap/lmap_operations.o build/temp.macosx-10.11-intel-2.7/src/main/geospatial/type.o build/temp.macosx-10.11-intel-2.7/src/main/geospatial/wrap.o build/temp.macosx-10.11-intel-2.7/src/main/geospatial/unwrap.o build/temp.macosx-10.11-intel-2.7/src/main/geospatial/loads.o build/temp.macosx-10.11-intel-2.7/src/main/geospatial/dumps.o build/temp.macosx-10.11-intel-2.7/src/main/conversions.o build/temp.macosx-10.11-intel-2.7/src/main/policy.o build/temp.macosx-10.11-intel-2.7/src/main/predicates.o build/temp.macosx-10.11-intel-2.7/src/main/global_hosts/type.o build/temp.macosx-10.11-intel-2.7/src/main/nullobject/type.o ./aerospike-client-c/lib/libaerospike.a -lssl -lcrypto -lpthread -lm -lz -o build/lib.macosx-10.11-intel-2.7/aerospike.so running install_lib copying build/lib.macosx-10.11-intel-2.7/aerospike.so -> /Library/Python/2.7/site-packages running install_data creating /System/Library/Frameworks/Python.framework/Versions/2.7/aerospike error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/aerospike': Operation not permitted

bbulkow commented 8 years ago

Yes, I contributed to that issue .... but it's closed, so I figure it's fixed.

Upgrading pip did not help.

Switching to brew's version of python seems to have helped. That has more recent of all the packages. There's no comment in the Aerospike install about version deps.... maybe that should be added.

bbulkow commented 8 years ago

Switching to homebrew installed python solved the issue.... but I think that the standard version of python ( not /usr/local ) may still have this problem.

The problem may well be related to SIP , new to python 10.11 , and it's relationship to pip, which makes it hard to maintain / develop with python. 'sudo' is no longer absolute.

This stackoverflow seems instructive, for anyone else with the problem. http://apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-el-capitan-max-os-x-upgrade

rbotzer commented 8 years ago

Just upgrading pip doesn't fully do it if you still have an old version of setuptools. Quite a slog. You want to end up with a version of pip >= 7.0.0 and a verion of setuptools >= 18.0.0.

However, as the stackexchange note suggests, you can install python from brew, and with it a new pip, and suddenly :trophy:

jboone100 commented 8 years ago

Try it with the 2.0.0 client:

(sudo) pip install aerospike==2.0.0