{"action":"created","issue":{"url":"https://api.github.com/repos/aaalgo/kgraph/issues/17","repository_url":"https://api.github.com/repos/aaalgo/kgraph","labels_url":"https://api.github.com/repos/aaalgo/kgraph/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/aaalgo/kgraph/issues/17/comments","events_url":"https://api.github.com/repos/aaalgo/kgraph/issues/17/events","html_url":"https://github.com/aaalgo/kgraph/issues/17","id":305867688,"number":17,"title":"python api","user":{"login":"cestas","id":35982129,"avatar_url":"https://avatars3.githubusercontent.com/u/35982129?v=4","gravatar_id":"","url":"https://api.github.com/users/cestas","html_url":"https://github.com/cestas","followers_url":"https://api.github.com/users/cestas/followers","following_url":"https://api.github.com/users/cestas/following{/other_user}","gists_url":"https://api.github.com/users/cestas/gists{/gist_id}","starred_url":"https://api.github.com/users/cestas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cestas/subscriptions","organizations_url":"https://api.github.com/users/cestas/orgs","repos_url":"https://api.github.com/users/cestas/repos","events_url":"https://api.github.com/users/cestas/events{/privacy}","received_events_url":"https://api.github.com/users/cestas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-16T10:03:55Z","updated_at":"2018-03-16T15:36:35Z","closed_at":null,"author_association":"NONE","body":"hi \r\ni am trying to use the python API but cannot seem to make the pykgraph package.\r\nI am using a linux16.04 machine.\r\ni cloned the repository onto my local computer in a folder and ran the initial compilation steps:\r\ncmake -DCMAKE_BUILD_TYPE=release .\r\nmake\r\nsudo make install\r\nThese went fine. when i run python setup.py install the only file that is created is pykgraph-2.0.egg-info in a folder where I have other python packages. There is no package folder 'pykgraph' that i can import into a python script which would then make a KNN graph. (I am using python 3.5)\r\nwhen i try to import pykgraph i get a segmentation default\r\nshobi@shobi:~/Documents/kgraph$ python\r\nPython 3.5.2 (default, Nov 23 2017, 16:37:01) \r\n[GCC 5.4.0 20160609] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import pykgraph\r\nSegmentation fault (core dumped)\r\nshobi@shobi:~/Documents/kgraph$ \r\n\r\nAlso, The first time i run setup.py install i get the following warnings, but no errors:\r\nrunning install\r\nrunning build\r\nrunning build_ext\r\nbuilding 'pykgraph' extension\r\ncreating build\r\ncreating build/temp.linux-x86_64-3.5\r\ncreating build/temp.linux-x86_64-3.5/python\r\nx86_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 -I. -I/home/shobi/.local/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -c kgraph.cpp -o build/temp.linux-x86_64-3.5/kgraph.o -O3 -std=c++11 -msse2 -fopenmp -DKGRAPH_VERSION=b'2372db6\\n'\r\ncc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++\r\nx86_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 -I. -I/home/shobi/.local/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -c metric.cpp -o build/temp.linux-x86_64-3.5/metric.o -O3 -std=c++11 -msse2 -fopenmp -DKGRAPH_VERSION=b'2372db6\\n'\r\ncc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++\r\nx86_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 -I. -I/home/shobi/.local/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -c python/pykgraph.cpp -o build/temp.linux-x86_64-3.5/python/pykgraph.o -O3 -std=c++11 -msse2 -fopenmp -DKGRAPH_VERSION=b'2372db6\\n'\r\ncc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++\r\nIn file included from /home/shobi/.local/lib/python3.5/site-packages/numpy/core/include/numpy/ndarraytypes.h:1816:0,\r\n                 from /home/shobi/.local/lib/python3.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,\r\n                 from python/pykgraph.cpp:5:\r\n/home/shobi/.local/lib/python3.5/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning \"Using deprecated NumPy API, disable it by \" \"#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\r\n #warning \"Using deprecated NumPy API, disable it by \" \\\r\n  ^\r\npython/pykgraph.cpp: In function ‘PyObject* {anonymous}::load_lshkit(const string&, PyObject*)’:\r\npython/pykgraph.cpp:64:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]\r\n         if (!(descr->elsize == elsize)) throw kgraph::io_error(path);\r\n                             ^\r\npython/pykgraph.cpp:66:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]\r\n         if ((!nd) || (PyArray_ITEMSIZE(nd) != elsize)) throw kgraph::runtime_er\r\n                                            ^\r\npython/pykgraph.cpp: In function ‘void* init()’:\r\npython/pykgraph.cpp:459:26: warning: control reaches end of non-void function [-Wreturn-type]\r\n init() { import_array(); }\r\n                          ^\r\ncreating build/lib.linux-x86_64-3.5\r\nx86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/kgraph.o build/temp.linux-x86_64-3.5/metric.o build/temp.linux-x86_64-3.5/python/pykgraph.o -lboost_python -lboost_timer -o build/lib.linux-x86_64-3.5/pykgraph.cpython-35m-x86_64-linux-gnu.so -fopenmp\r\nrunning install_lib\r\ncopying build/lib.linux-x86_64-3.5/pykgraph.cpython-35m-x86_64-linux-gnu.so -> /usr/local/lib/python3.5/dist-packages\r\nrunning install_egg_info\r\nRemoving /usr/local/lib/python3.5/dist-packages/pykgraph-2.0.egg-info\r\nWriting /usr/local/lib/python3.5/dist-packages/pykgraph-2.0.egg-info\r\nThank you for your help\r\nShobi "},"comment":{"url":"https://api.github.com/repos/aaalgo/kgraph/issues/comments/373751979","html_url":"https://github.com/aaalgo/kgraph/issues/17#issuecomment-373751979","issue_url":"https://api.github.com/repos/aaalgo/kgraph/issues/17","id":373751979,"user":{"login":"aaalgo","id":5427210,"avatar_url":"https://avatars0.githubusercontent.com/u/5427210?v=4","gravatar_id":"","url":"https://api.github.com/users/aaalgo","html_url":"https://github.com/aaalgo","followers_url":"https://api.github.com/users/aaalgo/followers","following_url":"https://api.github.com/users/aaalgo/following{/other_user}","gists_url":"https://api.github.com/users/aaalgo/gists{/gist_id}","starred_url":"https://api.github.com/users/aaalgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaalgo/subscriptions","organizations_url":"https://api.github.com/users/aaalgo/orgs","repos_url":"https://api.github.com/users/aaalgo/repos","events_url":"https://api.github.com/users/aaalgo/events{/privacy}","received_events_url":"https://api.github.com/users/aaalgo/received_events","type":"User","site_admin":false},"created_at":"2018-03-16T15:36:35Z","updated_at":"2018-03-16T15:36:35Z","author_association":"OWNER","body":"I've updated the code to select boost_python vs boost_python3 automatically.  But boost_python3 might have a different name on different platforms, so you might still need to modify setup.py."}}
{"actor":{"display_login":"aaalgo"}}