New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python-Igraph failed to build C core. #598
Comments
Can you provide some more details please? Which Linux distribution is it? Is it a 64-bit machine? Have you ever installed the C core of igraph separately on this machine? Or anything else that might help us reproduce the issue. |
|
Downloaded from where? http://igraph.sf.net? http://igraph.org? https://pypi.python.org/pypi/python-igraph? http://igraph.org/nightly? What version? |
I've downloaded 0.7 from pypi. On Wed, Mar 19, 2014 at 8:19 PM, Gabor Csardi notifications@github.comwrote:
|
Okay, let me install Sabayon Linux in a VM so I can test it myself. |
Thanks thats very cool! On Wed, Mar 19, 2014 at 8:50 PM, Tamás Nepusz notifications@github.comwrote:
|
This is just a workaround as I have yet to figure out what the exact problem is, but temporarily renaming For the record: I should also ensure that the C core of igraph is downloaded and compiled in a temporary directory that is not in |
Thanks a lot , i will test it out. On Fri, Mar 21, 2014 at 5:04 PM, Tamás Nepusz notifications@github.comwrote:
|
Added several refinements to |
Thanks i will test it , right now i am using graph-tool , its a lot harder than igraph tho. |
Hi Tamas, I had similar issues when trying to install igraph 0.7 (python-igraph) in a virtualenv on Ubuntu 14.04 LTS. How can I install the fix you added? Thanks, Sal |
The easiest is probably to download python-igraph-0.7.tar.gz from PyPI, replace |
I had similar problems running Arch linux. libm.a is compiled without the -fPIC flag. I also tried the patched setup.py from the develop branch. However it did not work for me. While compilation worked I could not import igraph in Python I got an error that _igraph.so is missing. |
This is probably because you were still standing in the folder where the Python interface was compiled. That folder has an |
Thanks. Making sure my working directory is different from the install directory I get the following error message
(I downloaded igraph 0.7 from PyPI and replaced setup.py by the patched file you linked) |
Thanks. I ended up doing the following and python-igraph seems to work now:
(Ubuntu 14.04 LTS) |
Did you try to run the unittests? While I can install igraph and python-igraph this way without error messages I get a
|
Ugh, good point - got the same segfault error here :(
|
You are probably running into this: It has been fixed since the release in the following commit: It happens only if you use |
Is this issue resolved yet? I still ran into the same bug while using it on Ubuntu 64 bit machine while trying to install using pip. I have not installed the C-core separately Also, the patched version is not available. |
The comments above mention several bugs and you did not specify which one you meant. Which bug are you running into? For what it's worth, I have successfully built |
I was talking about the "failed to build C core." issue. I could also install using apt-get. Using pip is problematic. |
Yes, but does |
The following is the output: Could not download and compile the C core of igraph. Cleaning up... |
This is a different bug, unrelated to the ones listed above. The problem is actually that you will have to install |
Still can't get through: This is the error. In file included from src/edgeobject.c:25:0: I think it is best not to use pip but apt-get |
You also need Also, |
Hi, Is the installation with pip issue resolved yet? I am running Linux Mint, and trying to install python-igraph in a virtual environment. I keep getting this error, despite having libigraph0-dev and libxml2-dev installed.
|
(The Try uninstalling |
Thank you, this worked! I had tried pip installing python-igraph before, but it had failed. Then I manually installed libigraph, and retried, with the error mentioned above. Now upon uninstalling libigraph as suggested, I was able to install successfully. Thank you very much. |
Mine is failing on OSX, attempts to install using pip, pip3, easy_install, and homebrew all yield this result:
|
@JoshMJacobson this is probably a sign of leftover files from previous installations of other pieces of software that contain Try installing the C core of igraph first from Homebrew (i.e. |
Try installing a pre-built binary from https://anaconda.org/marufr/python-igraph - others have reported that it works, but I haven't tried it myself.
… If python-igraph is my goal, how would you proceed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/igraph/_igraph.py", line 7, in How to solve this problem? |
@Yanxiangxiang have you solved your problem? |
Dear all, I am trying to install python IGraph on Fedora 25 but I'm stuck with the C core library. I run pip to try to install igraph but this is the output.
I also downloaded the source code from the igraph website (i.e. python-igraph-0.7.1.post6.tar.gz) and tried to run this package with pip too. I get the same error as above. I also tried to extract the tar package and run this command:
Any suggestion? thanks in advance |
Please post the full output of |
@ntamas |
You need to install |
@ntamas PS for other users that may found this useful: |
You also need the development libraries for Python itself if you want to compile a C extension for Python. It should be called something like |
@ntamas |
Yes; basically the compilation output always pinpointed a few libraries that were missing from your machine. |
@ntamas thank you for your help! |
Im installing on Ubuntu 16.04 LTS and I have the issue "cannot find lxml2". Please see attached output. |
You need to install |
This worked for me |
I can install python-igraph no problems using python/2.7.13, but it will not install in python/3.7.0, here is the error: ` Cannot find the C core of igraph on this system using pkg-config.
I am on CentOS 6.10, thanks. |
|
Failed installing with Docker on alpine3.8
Result: https://gist.github.com/squanchd/3fc8139583dea82d53fbeac50cf78003 |
The vendored I have now introduced a few commits in the
|
$ python setup.py build
running build
running build_py
running build_ext
Cannot find the C core of igraph on this system using pkg-config.
Build type: static extension
Include path: igraphcore/include
Library path: igraphcore/lib /usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib /lib64 /lib
Linked dynamic libraries: xml2 stdc++
Linked static libraries: igraphcore/lib/libigraph.a /usr/lib64/libz.a /usr/lib64/libm.a
Extra compiler options:
Extra linker options:
building 'igraph._igraph' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/indexing.c -o build/temp.linux-x86_64-2.7/src/indexing.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/py2compat.c -o build/temp.linux-x86_64-2.7/src/py2compat.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/edgeseqobject.c -o build/temp.linux-x86_64-2.7/src/edgeseqobject.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/common.c -o build/temp.linux-x86_64-2.7/src/common.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/pyhelpers.c -o build/temp.linux-x86_64-2.7/src/pyhelpers.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/edgeobject.c -o build/temp.linux-x86_64-2.7/src/edgeobject.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/random.c -o build/temp.linux-x86_64-2.7/src/random.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/graphobject.c -o build/temp.linux-x86_64-2.7/src/graphobject.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/attributes.c -o build/temp.linux-x86_64-2.7/src/attributes.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/vertexobject.c -o build/temp.linux-x86_64-2.7/src/vertexobject.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/arpackobject.c -o build/temp.linux-x86_64-2.7/src/arpackobject.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/filehandle.c -o build/temp.linux-x86_64-2.7/src/filehandle.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/vertexseqobject.c -o build/temp.linux-x86_64-2.7/src/vertexseqobject.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/convert.c -o build/temp.linux-x86_64-2.7/src/convert.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/bfsiter.c -o build/temp.linux-x86_64-2.7/src/bfsiter.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/error.c -o build/temp.linux-x86_64-2.7/src/error.o
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Iigraphcore/include -I../../build/include -I../../include -I/usr/local/include/igraph -I/usr/include/igraph -I/usr/include/python2.7 -c src/igraphmodule.c -o build/temp.linux-x86_64-2.7/src/igraphmodule.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. build/temp.linux-x86_64-2.7/src/indexing.o build/temp.linux-x86_64-2.7/src/py2compat.o build/temp.linux-x86_64-2.7/src/edgeseqobject.o build/temp.linux-x86_64-2.7/src/common.o build/temp.linux-x86_64-2.7/src/pyhelpers.o build/temp.linux-x86_64-2.7/src/edgeobject.o build/temp.linux-x86_64-2.7/src/random.o build/temp.linux-x86_64-2.7/src/graphobject.o build/temp.linux-x86_64-2.7/src/attributes.o build/temp.linux-x86_64-2.7/src/vertexobject.o build/temp.linux-x86_64-2.7/src/arpackobject.o build/temp.linux-x86_64-2.7/src/filehandle.o build/temp.linux-x86_64-2.7/src/vertexseqobject.o build/temp.linux-x86_64-2.7/src/convert.o build/temp.linux-x86_64-2.7/src/bfsiter.o build/temp.linux-x86_64-2.7/src/error.o build/temp.linux-x86_64-2.7/src/igraphmodule.o igraphcore/lib/libigraph.a /usr/lib64/libz.a /usr/lib64/libm.a -Ligraphcore/lib -L/usr/local/lib64 -L/usr/local/lib -L/usr/lib64 -L/usr/lib -L/lib64 -L/lib -L../../build/src/.libs -L../../src/.libs -L/usr/local/lib -L/usr/lib -L/usr/lib64 -lxml2 -lstdc++ -lpython2.7 -o build/lib.linux-x86_64-2.7/igraph/_igraph.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libm.a(k_standard.o): warning: relocation against
__kernel_standard' in readonly section
.text'./usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libm.a(s_atan.o): relocation R_X86_64_PC32 against symbol `__atan_sse2' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1
The text was updated successfully, but these errors were encountered: