{"action":"created","issue":{"url":"https://api.github.com/repos/igraph/igraph/issues/861","labels_url":"https://api.github.com/repos/igraph/igraph/issues/861/labels{/name}","comments_url":"https://api.github.com/repos/igraph/igraph/issues/861/comments","events_url":"https://api.github.com/repos/igraph/igraph/issues/861/events","html_url":"https://github.com/igraph/igraph/issues/861","id":105979134,"number":861,"title":"Error installing python-igraph using pip with pypy 2.6.1","user":{"login":"afressancourt","id":1731460,"avatar_url":"https://avatars.githubusercontent.com/u/1731460?v=3","gravatar_id":"","url":"https://api.github.com/users/afressancourt","html_url":"https://github.com/afressancourt","followers_url":"https://api.github.com/users/afressancourt/followers","following_url":"https://api.github.com/users/afressancourt/following{/other_user}","gists_url":"https://api.github.com/users/afressancourt/gists{/gist_id}","starred_url":"https://api.github.com/users/afressancourt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afressancourt/subscriptions","organizations_url":"https://api.github.com/users/afressancourt/orgs","repos_url":"https://api.github.com/users/afressancourt/repos","events_url":"https://api.github.com/users/afressancourt/events{/privacy}","received_events_url":"https://api.github.com/users/afressancourt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-11T09:50:31Z","updated_at":"2015-09-11T10:09:43Z","closed_at":"2015-09-11T10:09:43Z","body":"Hello,\r\n\r\nI am trying to install python-igraph using pip in a virtualenv wher the Python version used is pypy 2.6.1. After some time, I get an error trace, as presented in the following of my message. It states that pip \"failed building wheel for python-igraph\" \r\n\r\nReading the trace a bit more in details, it looks like there is a problem with PyWeakref_Check.\r\n\r\nThanks in advance for your help !\r\n\r\nI add the trace as a reference:\r\n\r\n  Extracting igraph-0.7.1.tar.gz...\r\n  Configuring igraph...\r\n  Build type: static extension\r\n  Include path: igraphcore/include\r\n  Library path: igraphcore/lib /usr/local/lib /usr/lib /lib64 /lib\r\n  Runtime library path:\r\n  Linked dynamic libraries: xml2 z m stdc++\r\n  Linked static libraries: igraphcore/lib/libigraph.a\r\n  Extra compiler options:\r\n  Extra linker options:\r\n  building 'igraph._igraph' extension\r\n  creating build/temp.linux-x86_64-2.7\r\n  creating build/temp.linux-x86_64-2.7/src\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/edgeseqobject.c -o build/temp.linux-x86_64-2.7/src/edgeseqobject.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/indexing.c -o build/temp.linux-x86_64-2.7/src/indexing.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/common.c -o build/temp.linux-x86_64-2.7/src/common.o\r\n  src/common.c: In function ‘igraphmodule_resolve_graph_weakref’:\r\n  src/common.c:58:3: warning: implicit declaration of function ‘PyWeakref_Check’ [-Wimplicit-function-declaration]\r\n     if (!PyWeakref_Check(ref)) {\r\n     ^\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/random.c -o build/temp.linux-x86_64-2.7/src/random.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/graphobject.c -o build/temp.linux-x86_64-2.7/src/graphobject.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/pyhelpers.c -o build/temp.linux-x86_64-2.7/src/pyhelpers.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/py2compat.c -o build/temp.linux-x86_64-2.7/src/py2compat.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/arpackobject.c -o build/temp.linux-x86_64-2.7/src/arpackobject.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/igraphmodule.c -o build/temp.linux-x86_64-2.7/src/igraphmodule.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/attributes.c -o build/temp.linux-x86_64-2.7/src/attributes.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/vertexseqobject.c -o build/temp.linux-x86_64-2.7/src/vertexseqobject.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/vertexobject.c -o build/temp.linux-x86_64-2.7/src/vertexobject.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/filehandle.c -o build/temp.linux-x86_64-2.7/src/filehandle.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/bfsiter.c -o build/temp.linux-x86_64-2.7/src/bfsiter.o\r\n  cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/convert.c -o build/temp.linux-x86_64-2.7/src/convert.o\r\n  src/convert.c: In function ‘igraphmodule_PyObject_to_real_t’:\r\n  src/convert.c:776:5: warning: passing argument 1 of ‘PyPyInt_AS_LONG’ from incompatible pointer type [enabled by default]\r\n       long l = PyInt_AS_LONG((PyIntObject*)object);\r\n       ^\r\n  In file included from /home/afressancourt/.virtualenvs/mypypy/include/Python.h:81:0,\r\n                   from src/convert.c:25:\r\n  /home/afressancourt/.virtualenvs/mypypy/include/pypy_macros.h:78:23: note: expected ‘struct PyObject *’ but argument is of type ‘struct PyIntObject *’\r\n   #define PyInt_AS_LONG PyPyInt_AS_LONG\r\n                         ^\r\n  /home/afressancourt/.virtualenvs/mypypy/include/pypy_decl.h:170:20: note: in expansion of macro ‘PyInt_AS_LONG’\r\n   PyAPI_FUNC(Signed) PyInt_AS_LONG(PyObject *arg0);\r\n                      ^\r\n  src/convert.c:781:35: error: ‘PyFloatObject’ undeclared (first use in this function)\r\n       double d = PyFloat_AS_DOUBLE((PyFloatObject*)object);\r\n                                     ^\r\n  src/convert.c:781:35: note: each undeclared identifier is reported only once for each function it appears in\r\n  src/convert.c:781:49: error: expected expression before ‘)’ token\r\n       double d = PyFloat_AS_DOUBLE((PyFloatObject*)object);\r\n                                                   ^\r\n  src/convert.c:788:42: error: expected expression before ‘)’ token\r\n       d = PyFloat_AS_DOUBLE((PyFloatObject*)i);\r\n                                            ^\r\n  error: command 'cc' failed with exit status 1\r\n  \r\n  ----------------------------------------\r\n  Failed building wheel for python-igraph\r\nFailed to build python-igraph\r\nInstalling collected packages: python-igraph\r\n  Running setup.py install for python-igraph\r\n    Complete output from command /home/afressancourt/.virtualenvs/mypypy/bin/pypy -c \"import setuptools, tokenize;__file__='/tmp/pip-build-uTp1rw/python-igraph/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /tmp/pip-vd55pQ-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/afressancourt/.virtualenvs/mypypy/include/site/python2.7/python-igraph:\r\n    running install\r\n    running build\r\n    running build_py\r\n    running build_ext\r\n    Cannot find the C core of igraph on this system using pkg-config.\r\n    Build type: static extension\r\n    Include path: igraphcore/include\r\n    Library path: igraphcore/lib /usr/local/lib /usr/lib /lib64 /lib\r\n    Runtime library path:\r\n    Linked dynamic libraries: xml2 z m stdc++\r\n    Linked static libraries: igraphcore/lib/libigraph.a\r\n    Extra compiler options:\r\n    Extra linker options:\r\n    building 'igraph._igraph' extension\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/edgeseqobject.c -o build/temp.linux-x86_64-2.7/src/edgeseqobject.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/indexing.c -o build/temp.linux-x86_64-2.7/src/indexing.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/common.c -o build/temp.linux-x86_64-2.7/src/common.o\r\n    src/common.c: In function ‘igraphmodule_resolve_graph_weakref’:\r\n    src/common.c:58:3: warning: implicit declaration of function ‘PyWeakref_Check’ [-Wimplicit-function-declaration]\r\n       if (!PyWeakref_Check(ref)) {\r\n       ^\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/random.c -o build/temp.linux-x86_64-2.7/src/random.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/graphobject.c -o build/temp.linux-x86_64-2.7/src/graphobject.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/pyhelpers.c -o build/temp.linux-x86_64-2.7/src/pyhelpers.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/py2compat.c -o build/temp.linux-x86_64-2.7/src/py2compat.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/arpackobject.c -o build/temp.linux-x86_64-2.7/src/arpackobject.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/igraphmodule.c -o build/temp.linux-x86_64-2.7/src/igraphmodule.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/attributes.c -o build/temp.linux-x86_64-2.7/src/attributes.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/vertexseqobject.c -o build/temp.linux-x86_64-2.7/src/vertexseqobject.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/vertexobject.c -o build/temp.linux-x86_64-2.7/src/vertexobject.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/filehandle.c -o build/temp.linux-x86_64-2.7/src/filehandle.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/bfsiter.c -o build/temp.linux-x86_64-2.7/src/bfsiter.o\r\n    cc -O2 -fPIC -Wimplicit -Iigraphcore/include -I/home/afressancourt/.virtualenvs/mypypy/include -c src/convert.c -o build/temp.linux-x86_64-2.7/src/convert.o\r\n    src/convert.c: In function ‘igraphmodule_PyObject_to_real_t’:\r\n    src/convert.c:776:5: warning: passing argument 1 of ‘PyPyInt_AS_LONG’ from incompatible pointer type [enabled by default]\r\n         long l = PyInt_AS_LONG((PyIntObject*)object);\r\n         ^\r\n    In file included from /home/afressancourt/.virtualenvs/mypypy/include/Python.h:81:0,\r\n                     from src/convert.c:25:\r\n    /home/afressancourt/.virtualenvs/mypypy/include/pypy_macros.h:78:23: note: expected ‘struct PyObject *’ but argument is of type ‘struct PyIntObject *’\r\n     #define PyInt_AS_LONG PyPyInt_AS_LONG\r\n                           ^\r\n    /home/afressancourt/.virtualenvs/mypypy/include/pypy_decl.h:170:20: note: in expansion of macro ‘PyInt_AS_LONG’\r\n     PyAPI_FUNC(Signed) PyInt_AS_LONG(PyObject *arg0);\r\n                        ^\r\n    src/convert.c:781:35: error: ‘PyFloatObject’ undeclared (first use in this function)\r\n         double d = PyFloat_AS_DOUBLE((PyFloatObject*)object);\r\n                                       ^\r\n    src/convert.c:781:35: note: each undeclared identifier is reported only once for each function it appears in\r\n    src/convert.c:781:49: error: expected expression before ‘)’ token\r\n         double d = PyFloat_AS_DOUBLE((PyFloatObject*)object);\r\n                                                     ^\r\n    src/convert.c:788:42: error: expected expression before ‘)’ token\r\n         d = PyFloat_AS_DOUBLE((PyFloatObject*)i);\r\n                                              ^\r\n    error: command 'cc' failed with exit status 1\r\n    \r\n    ----------------------------------------\r\nCommand \"/home/afressancourt/.virtualenvs/mypypy/bin/pypy -c \"import setuptools, tokenize;__file__='/tmp/pip-build-uTp1rw/python-igraph/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record /tmp/pip-vd55pQ-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/afressancourt/.virtualenvs/mypypy/include/site/python2.7/python-igraph\" failed with error code 1 in /tmp/pip-build-uTp1rw/python-igraph"},"comment":{"url":"https://api.github.com/repos/igraph/igraph/issues/comments/139506645","html_url":"https://github.com/igraph/igraph/issues/861#issuecomment-139506645","issue_url":"https://api.github.com/repos/igraph/igraph/issues/861","id":139506645,"user":{"login":"ntamas","id":195637,"avatar_url":"https://avatars.githubusercontent.com/u/195637?v=3","gravatar_id":"","url":"https://api.github.com/users/ntamas","html_url":"https://github.com/ntamas","followers_url":"https://api.github.com/users/ntamas/followers","following_url":"https://api.github.com/users/ntamas/following{/other_user}","gists_url":"https://api.github.com/users/ntamas/gists{/gist_id}","starred_url":"https://api.github.com/users/ntamas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntamas/subscriptions","organizations_url":"https://api.github.com/users/ntamas/orgs","repos_url":"https://api.github.com/users/ntamas/repos","events_url":"https://api.github.com/users/ntamas/events{/privacy}","received_events_url":"https://api.github.com/users/ntamas/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T10:09:43Z","updated_at":"2015-09-11T10:09:43Z","body":"The Python interface of igraph does not support PyPy officially. I have never even used PyPy myself; it looks like there is some trickery going on during the compilation process that \"transforms\" the C source code of the Python interface to make it compatible with the PyPy API, but in some cases it fails to do so.\r\n\r\nSince I don't use PyPy and have no plans to support PyPy in the near future, I'm closing this issue. If you managed to modify the source code of the Python interface to make it compile with PyPy, please send a pull request and then I'll try to merge the changes."}}