opened 03:20PM - 18 Jun 18 UTC
closed 03:45PM - 18 Jun 18 UTC
My machine details are:
Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS …Release: 16.04 Codename: xenial
`python3 -V`: Python 3.6.5
`pip3 -V`: pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.6)
Now when I tried to run: `sudo -H pip3 install aerospike`, I get the following error:
`Collecting aerospike
Downloading https://files.pythonhosted.org/packages/67/7a/113e52c45a1cd3e47b9f3299c2d654522797820752517addab550cc5f6df/aerospike-3.3.0.tar.gz (121kB)
100% |████████████████████████████████| 122kB 3.0MB/s
Building wheels for collected packages: aerospike
Running setup.py bdist_wheel for aerospike ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-olanaxjq/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp7cxxienjpip-wheel- --python-tag cp36:
info: Executing ./scripts/aerospike-client-c.sh
info: downloading 'https://artifacts.aerospike.com/aerospike-client-c/4.3.12/aerospike-client-c-devel-4.3.12.ubuntu16.04.x86_64.deb' to '/tmp/pip-build-olanaxjq/aerospike/aerospike-client-c/package/aerospike-client-c-devel-4.3.12.ubuntu16.04.x86_64.deb'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 387 100 387 0 0 1080 0 --:--:-- --:--:-- --:--:-- 1077
100 1149k 100 1149k 0 0 846k 0 0:00:01 0:00:01 --:--:-- 91.4M
info: extracting files from 'aerospike-client-c-devel-4.3.12.ubuntu16.04.x86_64.deb'
CHECK
[✓] /tmp/pip-build-olanaxjq/aerospike/aerospike-client-c/package/usr/lib/libaerospike.a
[✓] /tmp/pip-build-olanaxjq/aerospike/aerospike-client-c/package/usr/include/aerospike/aerospike.h
info: aerospike.h found: ./aerospike-client-c/include/aerospike/aerospike.h
info: libaerospike.a found: ./aerospike-client-c/lib/libaerospike.a
running bdist_wheel
running build
running build_ext
building 'aerospike' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
creating build/temp.linux-x86_64-3.6/src/main
creating build/temp.linux-x86_64-3.6/src/main/client
creating build/temp.linux-x86_64-3.6/src/main/query
creating build/temp.linux-x86_64-3.6/src/main/scan
creating build/temp.linux-x86_64-3.6/src/main/geospatial
creating build/temp.linux-x86_64-3.6/src/main/global_hosts
creating build/temp.linux-x86_64-3.6/src/main/nullobject
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Isrc/include -I/usr/local/opt/openssl/include -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -I/usr/include/python3.6m -c src/main/aerospike.c -o build/temp.linux-x86_64-3.6/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
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
----------------------------------------
Failed building wheel for aerospike
Running setup.py clean for aerospike
Failed to build aerospike
Installing collected packages: aerospike
Running setup.py install for aerospike ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-olanaxjq/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-d77mh1m3-record/install-record.txt --single-version-externally-managed --compile:
info: Executing ./scripts/aerospike-client-c.sh
warning: '/tmp/pip-build-olanaxjq/aerospike/aerospike-client-c' directory exists.
warning:
warning: We will be using this directory, rather than downloading a
warning: new package. If you would like to download a new package
warning: please remove the 'aerospike-client-c' directory.
CHECK
[✓] /tmp/pip-build-olanaxjq/aerospike/aerospike-client-c/package/usr/lib/libaerospike.a
[✓] /tmp/pip-build-olanaxjq/aerospike/aerospike-client-c/package/usr/include/aerospike/aerospike.h
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-3.6
creating build/temp.linux-x86_64-3.6/src
creating build/temp.linux-x86_64-3.6/src/main
creating build/temp.linux-x86_64-3.6/src/main/client
creating build/temp.linux-x86_64-3.6/src/main/query
creating build/temp.linux-x86_64-3.6/src/main/scan
creating build/temp.linux-x86_64-3.6/src/main/geospatial
creating build/temp.linux-x86_64-3.6/src/main/global_hosts
creating build/temp.linux-x86_64-3.6/src/main/nullobject
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Isrc/include -I/usr/local/opt/openssl/include -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -I/usr/include/python3.6m -c src/main/aerospike.c -o build/temp.linux-x86_64-3.6/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
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
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-olanaxjq/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-d77mh1m3-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-olanaxjq/aerospike/
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.`
Basically I want to run a file test.py. When I do that using python 2, `import aerospike` statement works fine. But with python3, it gives an error as:
`Traceback (most recent call last):
File "test.py", line 1, in <module>
import aerospike
ModuleNotFoundError: No module named 'aerospike'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "test.py", line 1, in <module>
import aerospike
ModuleNotFoundError: No module named 'aerospike'`
I want to be able to access aerospike features using pythn3, and not python2. Can someone help me here? Thanks!