Closed abh23 closed 9 years ago
Can you provide the version of pip you're using? pip --version
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)
Dear Team,
Any update on this??
Regards AB
We're actively working on this now. One (confirmed) possible cause is that you have an older version of the C client on your machine. The Python (and PHP, node.js) package makes use of the C client, and is bound to a specific version. When the version the Python client expects is mismatched with the version of the C client you have present, it will fail with the same errors you see.
I don't know if that is exactly what's happening. If it is, you should be able to manually remove the C client and try installing again. Obviously we'll change the scripts involved.
If you can, try installing again with the verbose flag (sudo pip -v install
), and paste the output here. It would help to get more information about the build, specifically if the C client is being downloaded, and which version it's getting. Thanks.
Here you are: Looks like it indeed is downloading aerospike-c client.
Downloading/unpacking aerospike Using version 1.0.45 (newest of versions: 1.0.45, 1.0.44, 1.0.43, 1.0.42, 1.0.41, 1.0.40, 1.0.38, 1.0.37, 1.0.36, 1.0.35, 1.0.34, 1.0.33, 1.0.31, 1.0.30) Downloading aerospike-1.0.45.tar.gz (123kB): Downloading from URL https://pypi.python.org/packages/source/a/aerospike/aerospike-1.0.45.tar.gz#md5=cb0fe43d3c7c635476653c1aa3152137 (from https://pypi.python.org/simple/aerospike/) ...Downloading aerospike-1.0.45.tar.gz (123kB): 123kB downloaded Running setup.py (path:/tmp/pip_build_root/aerospike/setup.py) egg_info for package aerospike running egg_info creating pip-egg-info/aerospike.egg-info writing pip-egg-info/aerospike.egg-info/PKG-INFO writing eager_resources to pip-egg-info/aerospike.egg-info/eager_resources.txt writing top-level names to pip-egg-info/aerospike.egg-info/top_level.txt writing dependency_links to pip-egg-info/aerospike.egg-info/dependency_links.txt writing manifest file 'pip-egg-info/aerospike.egg-info/SOURCES.txt' warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/aerospike.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pip-egg-info/aerospike.egg-info/SOURCES.txt'
Installing collected packages: aerospike Running setup.py install for aerospike
CHECK
[✓] /usr/lib/libaerospike.a
[✓] /usr/include/aerospike/aerospike.h
[✓] /opt/aerospike/client/sys/udf/lua/aerospike.lua
info: Executing ./scripts/aerospike-client-c.sh
info: aerospike.h found: ./aerospike-client-c/include/aerospike/aerospike.h
info: libaerospike.a found: ./aerospike-client-c/lib/libaerospike.a
running install
running build
running build_ext
building 'aerospike' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/main
creating build/temp.linux-x86_64-2.7/src/main/client
creating build/temp.linux-x86_64-2.7/src/main/key
creating build/temp.linux-x86_64-2.7/src/main/query
creating build/temp.linux-x86_64-2.7/src/main/scan
creating build/temp.linux-x86_64-2.7/src/main/lstack
creating build/temp.linux-x86_64-2.7/src/main/lset
creating build/temp.linux-x86_64-2.7/src/main/llist
creating build/temp.linux-x86_64-2.7/src/main/lmap
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -Isrc/include -I/usr/include/python2.7 -c src/main/aerospike.c -o build/temp.linux-x86_64-2.7/src/main/aerospike.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -rdynamic -finline-functions -DMARCH_x86_64
In file included from ./aerospike-client-c/include/aerospike/as_query.h:23:0,
from src/include/types.h:24,
from src/include/client.h:21,
from src/main/aerospike.c:22:
./aerospike-client-c/include/aerospike/as_udf.h:251:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
as_udf_file * as_udf_file_new();
^
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -Isrc/include -I/usr/include/python2.7 -c src/main/exception.c -o build/temp.linux-x86_64-2.7/src/main/exception.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -rdynamic -finline-functions -DMARCH_x86_64
In file included from ./aerospike-client-c/include/aerospike/as_query.h:23:0,
from src/main/exception.c:18:
./aerospike-client-c/include/aerospike/as_udf.h:251:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
as_udf_file * as_udf_file_new();
^
In file included from src/main/exception.c:22:0:
src/include/conversions.h:38:46: error: unknown type name ‘as_user’
as_status as_user_to_pyobject(as_error *err, as_user *user, PyObject **py_as_user);
^
src/include/conversions.h:40:52: error: unknown type name ‘as_user’
as_status as_user_array_to_pyobject(as_error *err, as_user **users, PyObject **py_as_users, int users_size);
^
In file included from src/main/exception.c:22:0:
src/include/conversions.h:78:53: error: unknown type name ‘as_privilege’
as_status as_privilege_to_pyobject( as_error * err, as_privilege privileges[], PyObject ** py_as_privilege, int privilege_size);
^
src/include/conversions.h:80:48: error: unknown type name ‘as_role’
as_status as_role_to_pyobject( as_error * err, as_role * role, PyObject ** py_as_role );
^
src/include/conversions.h:82:53: error: unknown type name ‘as_role’
as_status as_role_array_to_pyobject( as_error *err, as_role **roles, PyObject **py_as_roles, int roles_size );
^
src/include/conversions.h:84:72: error: unknown type name ‘as_privilege’
void pyobject_to_as_privileges(as_error *err, PyObject *py_privileges, as_privilege** privileges, int privileges_size);
^
src/main/exception.c: In function ‘AerospikeException_New’:
src/main/exception.c:45:4: error: ‘AEROSPIKE_ERR_FAIL_FORBIDDEN’ undeclared (first use in this function)
AEROSPIKE_ERR_FAIL_FORBIDDEN, AEROSPIKE_ERR_QUERY, AEROSPIKE_ERR_CLUSTER}
^
src/main/exception.c:45:4: note: each undeclared identifier is reported only once for each function it appears in
src/main/exception.c:83:28: error: ‘AEROSPIKE_ROLE_ALREADY_EXISTS’ undeclared (first use in this function)
AEROSPIKE_INVALID_ROLE, AEROSPIKE_ROLE_ALREADY_EXISTS, AEROSPIKE_ROLE_VIOLATION,
^
src/main/exception.c:168:27: error: ‘AEROSPIKE_ERR_INVALID_HOST’ undeclared (first use in this function)
py_code = PyInt_FromLong(AEROSPIKE_ERR_INVALID_HOST);
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/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-O8GETD-record/install-record.txt --single-version-externally-managed --compile:
CHECK
[✓] /usr/lib/libaerospike.a
[✓] /usr/include/aerospike/aerospike.h
[✓] /opt/aerospike/client/sys/udf/lua/aerospike.lua
info: Executing ./scripts/aerospike-client-c.sh
info: aerospike.h found: ./aerospike-client-c/include/aerospike/aerospike.h
info: libaerospike.a found: ./aerospike-client-c/lib/libaerospike.a
running install
running build
running build_ext
building 'aerospike' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/main
creating build/temp.linux-x86_64-2.7/src/main/client
creating build/temp.linux-x86_64-2.7/src/main/key
creating build/temp.linux-x86_64-2.7/src/main/query
creating build/temp.linux-x86_64-2.7/src/main/scan
creating build/temp.linux-x86_64-2.7/src/main/lstack
creating build/temp.linux-x86_64-2.7/src/main/lset
creating build/temp.linux-x86_64-2.7/src/main/llist
creating build/temp.linux-x86_64-2.7/src/main/lmap
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -Isrc/include -I/usr/include/python2.7 -c src/main/aerospike.c -o build/temp.linux-x86_64-2.7/src/main/aerospike.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -rdynamic -finline-functions -DMARCH_x86_64
In file included from ./aerospike-client-c/include/aerospike/as_query.h:23:0,
from src/include/types.h:24,
from src/include/client.h:21,
from src/main/aerospike.c:22:
./aerospike-client-c/include/aerospike/as_udf.h:251:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
as_udf_file * as_udf_file_new();
^
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -Isrc/include -I/usr/include/python2.7 -c src/main/exception.c -o build/temp.linux-x86_64-2.7/src/main/exception.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -rdynamic -finline-functions -DMARCH_x86_64
In file included from ./aerospike-client-c/include/aerospike/as_query.h:23:0,
from src/main/exception.c:18:
./aerospike-client-c/include/aerospike/as_udf.h:251:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
as_udf_file * as_udf_file_new();
^
In file included from src/main/exception.c:22:0:
src/include/conversions.h:38:46: error: unknown type name ‘as_user’
as_status as_user_to_pyobject(as_error _err, as_user user, PyObject _py_as_user);
^
src/include/conversions.h:40:52: error: unknown type name ‘as_user’
as_status as_user_array_to_pyobject(as_error _err, as_user *_users, PyObject **py_as_users, int users_size);
^
In file included from src/main/exception.c:22:0:
src/include/conversions.h:78:53: error: unknown type name ‘as_privilege’
as_status as_privilege_to_pyobject( as_error * err, as_privilege privileges[], PyObject \ py_as_privilege, int privilege_size);
^
src/include/conversions.h:80:48: error: unknown type name ‘as_role’
as_status as_role_to_pyobject( as_error * err, as_role * role, PyObject \ py_as_role );
^
src/include/conversions.h:82:53: error: unknown type name ‘as_role’
as_status as_role_array_to_pyobject( as_error _err, as_role *_roles, PyObject **py_as_roles, int roles_size );
^
src/include/conversions.h:84:72: error: unknown type name ‘as_privilege’
void pyobject_to_as_privileges(as_error _err, PyObject py_privileges, asprivilege\ privileges, int privileges_size);
^
src/main/exception.c: In function ‘AerospikeException_New’:
src/main/exception.c:45:4: error: ‘AEROSPIKE_ERR_FAIL_FORBIDDEN’ undeclared (first use in this function)
AEROSPIKE_ERR_FAIL_FORBIDDEN, AEROSPIKE_ERR_QUERY, AEROSPIKE_ERR_CLUSTER}
^
src/main/exception.c:45:4: note: each undeclared identifier is reported only once for each function it appears in
src/main/exception.c:83:28: error: ‘AEROSPIKE_ROLE_ALREADY_EXISTS’ undeclared (first use in this function)
AEROSPIKE_INVALID_ROLE, AEROSPIKE_ROLE_ALREADY_EXISTS, AEROSPIKE_ROLE_VIOLATION,
^
src/main/exception.c:168:27: error: ‘AEROSPIKE_ERR_INVALID_HOST’ undeclared (first use in this function)
py_code = PyInt_FromLong(AEROSPIKE_ERR_INVALID_HOST);
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Cleaning up... Removing temporary dir /tmp/pip_build_root... Command /usr/bin/python -c "import setuptools, tokenize;file='/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-O8GETD-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/aerospike Exception information: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run requirement_set.install(install_options, global_options, root=options.root_path) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1435, in install requirement.install(install_options, global_options, _args, *_kwargs) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 706, in install cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) File "/usr/lib/python2.7/dist-packages/pip/util.py", line 697, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;file='/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-O8GETD-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/aerospike
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in
Thank you. Does /tmp/pip_build_root/aerospike still exist after the pip install
fails?
No. It doesn't.
I did a complete install of aerospike's python client from base 14.04, and it worked - with one tweak.
sudo pip install aerospike
. If I just ran pip install aerospike
I got the same error about UnicodeDecodeError.
I suggest trying with sudo
I already tried with both sudo and non-sudo commands. But it still is showing me same error.
Thanks for your help. I believe we have it, and it will be part of the next release.
This should be fixed with release 1.0.46. Please verify.
Issue has been resolved after the fix. Tested just now. Thanks a lot for quick work.
Regards Amit
Thanks for verifying it, Amit.
Unfortunately, I had to reopen this again. I am trying to install aerospike on fresh ubuntu 14.04 server and getting this error while installation. I am using 1.0.46.tar.gz to install python client.
creating build/temp.linux-x86_64-2.7/src/main/lmap x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -Isrc/include -I/usr/include/python2.7 -c src/main/aerospike.c -o build/temp.linux-x86_64-2.7/src/main/aerospike.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -rdynamic -finline-functions -DMARCH_x86_64 src/main/aerospike.c:17:20: fatal error: Python.h: No such file or directory
^
compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Please check and let me know where has this gone wrong now.
It seems that you're missing the Python development package if Python.h cannot be included. The dependencies are libssl and those, as described in the Ubuntu and Debian section of the top-level README.
I need to add a nicer error message there! Please add those two apt
packages and try again. Can you let me know if that fixes the problem?
Sorry for the late reply. I actually figured it out yesterday. On ubuntu 14.04 there are three package that are basically required. I recommend using apt-get to install them. a) python-dev, b) python-pip and c) libssl-dev
This fixed all the problems for me.
Thanks Rbotzer for the solution too. Yeah it will be nice if relevant error can be printed if installation fails due to this reason or other. Probably libexplain.so might help in that regard (just a guess).
i am having problem trying to install aerospike python in ubuntu 15.04. it gives me error saying ubuntu15 not supported.
keshav@l-fkz6152:~$ sudo -H pip install -v aerospike sudo: /etc/sudoers.d is world writable Collecting aerospike Getting page https://pypi.python.org/simple/aerospike/ 1 location(s) to search for versions of aerospike:
https://pypi.python.org/simple/aerospike/ Getting page https://pypi.python.org/simple/aerospike/ Analyzing links from page https://pypi.python.org/simple/aerospike/ Skipping link https://pypi.python.org/packages/2.6/a/aerospike/aerospike-1.0.50-cp26-none-macosx_10_10_x86_64.whl#md5=cd06c5b2b12afc93522cd9dca74d0190 (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.6/a/aerospike/aerospike-1.0.50-py2.6-osx-10.10-x86_64.egg#md5=fb1a703c94242417a75c02da7d716004 (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.6/a/aerospike/aerospike-1.0.52-cp26-none-macosx_10_10_x86_64.whl#md5=cad1f0c348dc3b627868e733e0ab2504 (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.6/a/aerospike/aerospike-1.0.52-py2.6-macosx-10.10-x86_64.egg#md5=85fd6170a68e4bcac4313c76fa11d785 (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.6/a/aerospike/aerospike-1.0.53-cp26-none-macosx_10_10_x86_64.whl#md5=588698b75655430260b42e66fc384943 (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.6/a/aerospike/aerospike-1.0.53-py2.6-macosx-10.10-x86_64.egg#md5=82da202dd0ce4c6a97513f5403a09c9a (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.6/a/aerospike/aerospike-1.0.54-cp26-none-macosx_10_10_x86_64.whl#md5=5ba39b2618acae91e38ef82c0e5e6ddc (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.6/a/aerospike/aerospike-1.0.54-py2.6-macosx-10.10-x86_64.egg#md5=00f314ecb6a354dd96c0ef845815e29b (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.6/a/aerospike/aerospike-1.0.55-cp26-none-macosx_10_10_x86_64.whl#md5=a12648227d5f0ac99770006f82f7e117 (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.6/a/aerospike/aerospike-1.0.55-py2.6-macosx-10.10-x86_64.egg#md5=fec1937842bc1cd39724824b6b0993de (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.50-cp27-none-macosx_10_10_x86_64.whl#md5=385b99d6612008d12e668e223981232e (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.50-cp27-none-macosx_10_9_x86_64.whl#md5=c618eedaa630ea68059e6faed10a66c7 (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.50-py2.7-macosx-10.10-x86_64.egg#md5=5578587565da03235659361857b29ba3 (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.50-py2.7-macosx-10.9-x86_64.egg#md5=fa1b513f4b85bc7e08ff44e6602af339 (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.52-cp27-none-macosx_10_10_x86_64.whl#md5=f37dbc7ee004f7c0a3df7aa03e06be71 (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.52-cp27-none-macosx_10_9_x86_64.whl#md5=24b11d2750db4aa3aef0735ec7624a0a (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.52-py2.7-macosx-10.10-x86_64.egg#md5=2a8e62f62f6254d452878b4ba5ad0d28 (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.52-py2.7-macosx-10.9-x86_64.egg#md5=a9fab75186b7454cc6ecedaa8192e959 (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.53-cp27-none-macosx_10_10_x86_64.whl#md5=471e85dff33d97f2b553752f62210739 (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.53-cp27-none-macosx_10_9_x86_64.whl#md5=adccdf5b54652932d44bc9b56a1d6660 (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.53-py2.7-macosx-10.10-x86_64.egg#md5=f49f1b88a00b8ecca3c641acdba82cfb (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.53-py2.7-macosx-10.9-x86_64.egg#md5=590e52c71f55f9bedef7b58964eae627 (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.54-cp27-none-macosx_10_10_x86_64.whl#md5=fe91d34a029dcd773a446cfe03104d10 (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.54-cp27-none-macosx_10_9_x86_64.whl#md5=6108849ce8d46756f6e23f4a414ad23d (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.54-py2.7-macosx-10.10-x86_64.egg#md5=2ac71c5077ccdd36deebec8d3ca20274 (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.54-py2.7-macosx-10.9-x86_64.egg#md5=5b33a1daee8cdc2d6cf61a2726615c9d (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.55-cp27-none-macosx_10_10_x86_64.whl#md5=67493a9f2ac1d67893c77bf93fbf6403 (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.55-cp27-none-macosx_10_9_x86_64.whl#md5=7f34001cae907ee5d85618267abd532d (from https://pypi.python.org/simple/aerospike/); it is not compatible with this Python Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.55-py2.7-macosx-10.10-x86_64.egg#md5=64e478b919b250be0df823bd5d55398e (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Skipping link https://pypi.python.org/packages/2.7/a/aerospike/aerospike-1.0.55-py2.7-macosx-10.9-x86_64.egg#md5=b253c3ae2ba950ea0f70aa1e357862d4 (from https://pypi.python.org/simple/aerospike/); unsupported archive format: .egg Found link https://pypi.python.org/packages/source/a/aerospike/aerospike-1.0.50.tar.gz#md5=c0acce94fe11c8846b4b47a93064f56b (from https://pypi.python.org/simple/aerospike/), version: 1.0.50 Found link https://pypi.python.org/packages/source/a/aerospike/aerospike-1.0.52.tar.gz#md5=c9d84c567a28f49baa4bc6482c1bba28 (from https://pypi.python.org/simple/aerospike/), version: 1.0.52 Found link https://pypi.python.org/packages/source/a/aerospike/aerospike-1.0.53.tar.gz#md5=a8f8f8991566efa65db08227e47c79ab (from https://pypi.python.org/simple/aerospike/), version: 1.0.53 Found link https://pypi.python.org/packages/source/a/aerospike/aerospike-1.0.54.tar.gz#md5=c77adc546f2d679ad6917d1c2329130d (from https://pypi.python.org/simple/aerospike/), version: 1.0.54 Found link https://pypi.python.org/packages/source/a/aerospike/aerospike-1.0.55.tar.gz#md5=074a1862455765cbe0a2dd9583fad660 (from https://pypi.python.org/simple/aerospike/), version: 1.0.55 Using version 1.0.55 (newest of versions: 1.0.55, 1.0.54, 1.0.53, 1.0.52, 1.0.50) Using cached aerospike-1.0.55.tar.gz Downloading from URL https://pypi.python.org/packages/source/a/aerospike/aerospike-1.0.55.tar.gz#md5=074a1862455765cbe0a2dd9583fad660 (from https://pypi.python.org/simple/aerospike/) Running setup.py (path:/tmp/pip-build-fHfpPT/aerospike/setup.py) egg_info for package aerospike Running command python setup.py egg_info running egg_info creating pip-egg-info/aerospike.egg-info writing pip-egg-info/aerospike.egg-info/PKG-INFO writing eager_resources to pip-egg-info/aerospike.egg-info/eager_resources.txt writing top-level names to pip-egg-info/aerospike.egg-info/top_level.txt writing dependency_links to pip-egg-info/aerospike.egg-info/dependency_links.txt writing manifest file 'pip-egg-info/aerospike.egg-info/SOURCES.txt' warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/aerospike.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pip-egg-info/aerospike.egg-info/SOURCES.txt' Source in /tmp/pip-build-fHfpPT/aerospike has version 1.0.55, which satisfies requirement aerospike from https://pypi.python.org/packages/source/a/aerospike/aerospike-1.0.55.tar.gz#md5=074a1862455765cbe0a2dd9583fad660 Building wheels for collected packages: aerospike Running setup.py bdist_wheel for aerospike Destination directory: /tmp/tmpFLmiZhpip-wheel- Running command /usr/bin/python -c "import setuptools;file='/tmp/pip-build-fHfpPT/aerospike/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmpFLmiZhpip-wheel- running bdist_wheel running build running build_ext building 'aerospike' extension creating build creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src creating build/temp.linux-x86_64-2.7/src/main creating build/temp.linux-x86_64-2.7/src/main/client creating build/temp.linux-x86_64-2.7/src/main/key creating build/temp.linux-x86_64-2.7/src/main/query creating build/temp.linux-x86_64-2.7/src/main/scan creating build/temp.linux-x86_64-2.7/src/main/lstack creating build/temp.linux-x86_64-2.7/src/main/lset creating build/temp.linux-x86_64-2.7/src/main/llist creating build/temp.linux-x86_64-2.7/src/main/lmap creating build/temp.linux-x86_64-2.7/src/main/geospatial x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Isrc/include -I/usr/include/python2.7 -c src/main/aerospike.c -o build/temp.linux-x86_64-2.7/src/main/aerospike.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 -rdynamic -finline-functions -DMARCH_x86_64 In file included from src/include/client.h:21:0, from src/main/aerospike.c:22: src/include/types.h:22:33: fatal error: aerospike/aerospike.h: No such file or directory
^
compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 Complete output from command /usr/bin/python -c "import setuptools;file='/tmp/pip-build-fHfpPT/aerospike/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmpFLmiZhpip-wheel-: running bdist_wheel running build running build_ext building 'aerospike' extension creating build creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src creating build/temp.linux-x86_64-2.7/src/main creating build/temp.linux-x86_64-2.7/src/main/client creating build/temp.linux-x86_64-2.7/src/main/key creating build/temp.linux-x86_64-2.7/src/main/query creating build/temp.linux-x86_64-2.7/src/main/scan creating build/temp.linux-x86_64-2.7/src/main/lstack creating build/temp.linux-x86_64-2.7/src/main/lset creating build/temp.linux-x86_64-2.7/src/main/llist creating build/temp.linux-x86_64-2.7/src/main/lmap creating build/temp.linux-x86_64-2.7/src/main/geospatial x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Isrc/include -I/usr/include/python2.7 -c src/main/aerospike.c -o build/temp.linux-x86_64-2.7/src/main/aerospike.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 -rdynamic -finline-functions -DMARCH_x86_64 In file included from src/include/client.h:21:0, from src/main/aerospike.c:22: src/include/types.h:22:33: fatal error: aerospike/aerospike.h: No such file or directory
^
compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Failed building wheel for aerospike Failed to build aerospike Installing collected packages: aerospike Running setup.py install for aerospike Running command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-fHfpPT/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-FyKgie-record/install-record.txt --single-version-externally-managed --compile error: ubuntu15 is not supported. error: scripts/aerospike-client-c.sh 1 info: Executing ./scripts/aerospike-client-c.sh Complete output from command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-fHfpPT/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-FyKgie-record/install-record.txt --single-version-externally-managed --compile: error: ubuntu15 is not supported. error: scripts/aerospike-client-c.sh 1 info: Executing ./scripts/aerospike-client-c.sh
Cleaning up... Removing source in /tmp/pip-build-fHfpPT/aerospike Command "/usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-fHfpPT/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-FyKgie-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-fHfpPT/aerospike Exception information: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main status = self.run(options, args) File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run root=options.root_path, File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 646, in install kwargs File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 852, in install show_stdout=False, File "/usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/utils/init.py", line 733, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command "/usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-fHfpPT/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file**, 'exec'))" install --record /tmp/pip-FyKgie-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-fHfpPT/aerospike keshav@l-fkz6152:~$
This is in progress and should be part of the next (1.0.56) release. For now you can edit the helper script which downloads the C client scripts-aerospike-client-c
, line 71, and add | "ubuntu15"
in there. Also line 149 and add | "14.*"
Try that.
after the necessary modifications, i run the setup.py file; but then also it says cannot find module aerospike
After the edit, did you run both of these?
python setup.py build --force
python setup.py install --force
Do they run successfully?
yes they run successfully. here i am attaching the build and install responses build.txt install.txt
Good. The module still doesn't load when you import aerospike
? Can you verify that it's there in the install path, and check that /usr/local/aerospike/lua
has files in it?
I am sorry, i am new to this. can you please explain statement about the install path and how to check if its there in it
files in usr/local/aerospike/lua -aerospike.lua -as.lua -stream_ops.lua
On Tue, Nov 17, 2015 at 8:00 PM, Ronen Botzer notifications@github.com wrote:
Good. The module still doesn't load when you import aerospike ? Can you verify that it's there in the install path, and check that /usr/local/aerospike/lua has files in it?
— Reply to this email directly or view it on GitHub https://github.com/aerospike/aerospike-client-python/issues/59#issuecomment-157386262 .
Keshav Sarraf
That looks fine. Does the module load now?
Dear Team,
I am trying to install aerospike python client on ubuntu 14.04 but getting this error while running "pip install aerospike"
I have installed all the packages as mentioned on page along with python-dev package. Please assist in the same.
$ python --version Python 2.7.6
CHECK
[✓] /usr/lib/libaerospike.a
[✓] /usr/include/aerospike/aerospike.h
[✓] /opt/aerospike/client/sys/udf/lua/aerospike.lua
info: Executing ./scripts/aerospike-client-c.sh
info: aerospike.h found: ./aerospike-client-c/include/aerospike/aerospike.h
info: libaerospike.a found: ./aerospike-client-c/lib/libaerospike.a
running install
running build
running build_ext
building 'aerospike' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/main
creating build/temp.linux-x86_64-2.7/src/main/client
creating build/temp.linux-x86_64-2.7/src/main/key
creating build/temp.linux-x86_64-2.7/src/main/query
creating build/temp.linux-x86_64-2.7/src/main/scan
creating build/temp.linux-x86_64-2.7/src/main/lstack
creating build/temp.linux-x86_64-2.7/src/main/lset
creating build/temp.linux-x86_64-2.7/src/main/llist
creating build/temp.linux-x86_64-2.7/src/main/lmap
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -Isrc/include -I/usr/include/python2.7 -c src/main/aerospike.c -o build/temp.linux-x86_64-2.7/src/main/aerospike.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -rdynamic -finline-functions -DMARCH_x86_64
In file included from ./aerospike-client-c/include/aerospike/as_query.h:23:0,
./aerospike-client-c/include/aerospike/as_udf.h:251:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
as_udf_file * as_udf_file_new();
^
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -Isrc/include -I/usr/include/python2.7 -c src/main/exception.c -o build/temp.linux-x86_64-2.7/src/main/exception.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -rdynamic -finline-functions -DMARCH_x86_64
In file included from ./aerospike-client-c/include/aerospike/as_query.h:23:0,
./aerospike-client-c/include/aerospike/as_udf.h:251:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
as_udf_file * as_udf_file_new();
^
In file included from src/main/exception.c:22:0:
src/include/conversions.h:38:46: error: unknown type name ‘as_user’
as_status as_user_to_pyobject(as_error _err, as_user user, PyObject _py_as_user);
src/include/conversions.h:40:52: error: unknown type name ‘as_user’
as_status as_user_array_to_pyobject(as_error _err, as_user *_users, PyObject **py_as_users, int users_size);
In file included from src/main/exception.c:22:0:
src/include/conversions.h:78:53: error: unknown type name ‘as_privilege’
as_status as_privilege_to_pyobject( as_error * err, as_privilege privileges[], PyObject \ py_as_privilege, int privilege_size);
src/include/conversions.h:80:48: error: unknown type name ‘as_role’
as_status as_role_to_pyobject( as_error * err, as_role * role, PyObject \ py_as_role );
src/include/conversions.h:82:53: error: unknown type name ‘as_role’
as_status as_role_array_to_pyobject( as_error _err, as_role *_roles, PyObject **py_as_roles, int roles_size );
src/include/conversions.h:84:72: error: unknown type name ‘as_privilege’
void pyobject_to_as_privileges(as_error _err, PyObject py_privileges, asprivilege\ privileges, int privileges_size);
src/main/exception.c: In function ‘AerospikeException_New’:
src/main/exception.c:45:4: error: ‘AEROSPIKE_ERR_FAIL_FORBIDDEN’ undeclared (first use in this function)
src/main/exception.c:45:4: note: each undeclared identifier is reported only once for each function it appears in
src/main/exception.c:83:28: error: ‘AEROSPIKE_ROLE_ALREADY_EXISTS’ undeclared (first use in this function)
src/main/exception.c:168:27: error: ‘AEROSPIKE_ERR_INVALID_HOST’ undeclared (first use in this function)
py_code = PyInt_FromLong(AEROSPIKE_ERR_INVALID_HOST);
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;file='/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-jx_N2h-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/aerospike Traceback (most recent call last): File "/usr/bin/pip", line 9, in
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/init.py", line 235, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/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)