pygattlib
pygattlib copied to clipboard
Installing gattlib in python2.7
Hello, recently I've tried to install gattlib via sudo -H python -m pip install gattlib, where python points to python2 ( 2.7 ) but it was unsuccessful and it threw this error:
Collecting gattlib Using cached gattlib-0.20201113.tar.gz (50 kB) Building wheels for collected packages: gattlib Building wheel for gattlib (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-TyrlK8/gattlib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-TyrlK8/gattlib/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 /tmp/pip-wheel-fEQmhc cwd: /tmp/pip-install-TyrlK8/gattlib/ Complete output (46 lines): running bdist_wheel running build running build_ext building 'gattlib' 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/bluez creating build/temp.linux-x86_64-2.7/src/bluez/lib creating build/temp.linux-x86_64-2.7/src/bluez/attrib creating build/temp.linux-x86_64-2.7/src/bluez/src creating build/temp.linux-x86_64-2.7/src/bluez/src/shared creating build/temp.linux-x86_64-2.7/src/bluez/btio x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QDqKfA/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/gattservices.cpp -o build/temp.linux-x86_64-2.7/src/gattservices.o x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QDqKfA/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/beacon.cpp -o build/temp.linux-x86_64-2.7/src/beacon.o x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QDqKfA/python2.7-2.7.18=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Isrc/bluez -I/usr/include/python2.7 -c src/bindings.cpp -o build/temp.linux-x86_64-2.7/src/bindings.o src/bindings.cpp: In function ‘PyObject* createExceptionClass(const char*, PyObject*, boost::python::api::object&, const char*)’: src/bindings.cpp:199:57: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] 199 | PyObject* rv = PyErr_NewExceptionWithDoc(qname.c_str(), docstr, baseType, 0); | ~~~~~~~~~~~^~ | | | const char* In file included from /usr/include/python2.7/Python.h:124, from /usr/include/boost/python/detail/wrap_python.hpp:178, from /usr/include/boost/python/detail/prefix.hpp:13, from /usr/include/boost/python/args.hpp:8, from /usr/include/boost/python.hpp:11, from src/bindings.cpp:6: /usr/include/python2.7/pyerrors.h:227:11: note: initializing argument 1 of ‘PyObject* PyErr_NewExceptionWithDoc(char*, char*, PyObject*, PyObject*)’ 227 | char *name, char *doc, PyObject *base, PyObject *dict); | ~~~~~~^~~~ src/bindings.cpp:199:61: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] 199 | PyObject* rv = PyErr_NewExceptionWithDoc(qname.c_str(), docstr, baseType, 0); | ^~~~~~ | | | const char* In file included from /usr/include/python2.7/Python.h:124, from /usr/include/boost/python/detail/wrap_python.hpp:178, from /usr/include/boost/python/detail/prefix.hpp:13, from /usr/include/boost/python/args.hpp:8, from /usr/include/boost/python.hpp:11, from src/bindings.cpp:6: /usr/include/python2.7/pyerrors.h:227:23: note: initializing argument 2 of ‘PyObject* PyErr_NewExceptionWithDoc(char*, char*, PyObject*, PyObject*)’ 227 | char *name, char *doc, PyObject *base, PyObject *dict); | ~~~~~~^~~ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for gattlib
Any clue how to solve this? Thanks in advance.