Skip to content
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

cannot install python-igraph on macosx #538

Closed
sam-s opened this issue Nov 10, 2013 · 7 comments
Closed

cannot install python-igraph on macosx #538

sam-s opened this issue Nov 10, 2013 · 7 comments

Comments

@sam-s
Copy link

sam-s commented Nov 10, 2013

OS X 10.9
sudo easy_install pip installs pip 1.4.1:

Installed /Library/Python/2.7/site-packages/pip-1.4.1-py2.7.egg

However, installing python-igraph fails:

$ pip install python-igraph
Downloading/unpacking python-igraph
  Downloading python-igraph-0.6.5.tar.gz (352kB): 352kB downloaded
  Running setup.py egg_info for package python-igraph
    Using default include and library paths for compilation
    If the compilation fails, please edit the LIBIGRAPH_FALLBACK_*
    variables in setup.py or include_dirs and library_dirs in
    setup.cfg to point to the correct directories and libraries
    where the C core of igraph is installed

    Include path: /usr/include/igraph /usr/local/include/igraph
    Library path:

Installing collected packages: python-igraph
  Running setup.py install for python-igraph
    Using default include and library paths for compilation
    If the compilation fails, please edit the LIBIGRAPH_FALLBACK_*
    variables in setup.py or include_dirs and library_dirs in
    setup.cfg to point to the correct directories and libraries
    where the C core of igraph is installed

    Include path: /usr/include/igraph /usr/local/include/igraph
    Library path:
    building 'igraph._igraph' extension
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/usr/include/igraph -I/usr/local/include/igraph -I../../build/include -I../../include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/arpackobject.c -o build/temp.macosx-10.9-intel-2.7/src/arpackobject.o
    clang: warning: argument unused during compilation: '-mno-fused-madd'
    In file included from src/arpackobject.c:23:
    src/arpackobject.h:27:10: fatal error: 'igraph_arpack.h' file not found
    #include <igraph_arpack.h>
             ^
    1 error generated.
    error: command 'cc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/var/tmp/pip_build_sds/python-igraph/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/tmp/pip-9Di_Ds-record/install-record.txt --single-version-externally-managed:
    Using default include and library paths for compilation

If the compilation fails, please edit the LIBIGRAPH_FALLBACK_*

variables in setup.py or include_dirs and library_dirs in

setup.cfg to point to the correct directories and libraries

where the C core of igraph is installed



Include path: /usr/include/igraph /usr/local/include/igraph

Library path:

running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-intel-2.7

creating build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/__init__.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/clustering.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/compat.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/configuration.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/cut.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/datatypes.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/formula.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/layout.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/matching.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/nexus.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/statistics.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/summary.py -> build/lib.macosx-10.9-intel-2.7/igraph

copying igraph/utils.py -> build/lib.macosx-10.9-intel-2.7/igraph

creating build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/__init__.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/atlas.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/attributes.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/basic.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/bipartite.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/cliques.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/colortests.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/conversion.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/decomposition.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/edgeseq.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/flow.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/foreign.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/games.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/generators.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/homepage.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/indexing.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/isomorphism.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/iterators.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/layouts.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/matching.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/operators.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/rng.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/separators.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/spectral.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/structural.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

copying igraph/test/vertexseq.py -> build/lib.macosx-10.9-intel-2.7/igraph/test

creating build/lib.macosx-10.9-intel-2.7/igraph/app

copying igraph/app/__init__.py -> build/lib.macosx-10.9-intel-2.7/igraph/app

copying igraph/app/shell.py -> build/lib.macosx-10.9-intel-2.7/igraph/app

creating build/lib.macosx-10.9-intel-2.7/igraph/drawing

copying igraph/drawing/__init__.py -> build/lib.macosx-10.9-intel-2.7/igraph/drawing

copying igraph/drawing/baseclasses.py -> build/lib.macosx-10.9-intel-2.7/igraph/drawing

copying igraph/drawing/colors.py -> build/lib.macosx-10.9-intel-2.7/igraph/drawing

copying igraph/drawing/coord.py -> build/lib.macosx-10.9-intel-2.7/igraph/drawing

copying igraph/drawing/edge.py -> build/lib.macosx-10.9-intel-2.7/igraph/drawing

copying igraph/drawing/graph.py -> build/lib.macosx-10.9-intel-2.7/igraph/drawing

copying igraph/drawing/metamagic.py -> build/lib.macosx-10.9-intel-2.7/igraph/drawing

copying igraph/drawing/shapes.py -> build/lib.macosx-10.9-intel-2.7/igraph/drawing

copying igraph/drawing/text.py -> build/lib.macosx-10.9-intel-2.7/igraph/drawing

copying igraph/drawing/utils.py -> build/lib.macosx-10.9-intel-2.7/igraph/drawing

creating build/lib.macosx-10.9-intel-2.7/igraph/remote

copying igraph/remote/__init__.py -> build/lib.macosx-10.9-intel-2.7/igraph/remote

copying igraph/remote/gephi.py -> build/lib.macosx-10.9-intel-2.7/igraph/remote

creating build/lib.macosx-10.9-intel-2.7/igraph/vendor

copying igraph/vendor/__init__.py -> build/lib.macosx-10.9-intel-2.7/igraph/vendor

copying igraph/vendor/texttable.py -> build/lib.macosx-10.9-intel-2.7/igraph/vendor

running build_ext

building 'igraph._igraph' extension

creating build/temp.macosx-10.9-intel-2.7

creating build/temp.macosx-10.9-intel-2.7/src

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/usr/include/igraph -I/usr/local/include/igraph -I../../build/include -I../../include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/arpackobject.c -o build/temp.macosx-10.9-intel-2.7/src/arpackobject.o

clang: warning: argument unused during compilation: '-mno-fused-madd'

In file included from src/arpackobject.c:23:

src/arpackobject.h:27:10: fatal error: 'igraph_arpack.h' file not found

#include <igraph_arpack.h>

         ^

1 error generated.

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools;__file__='/private/var/tmp/pip_build_sds/python-igraph/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/tmp/pip-9Di_Ds-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/tmp/pip_build_sds/python-igraph
Storing complete log in /Users/sds/Library/Logs/pip.log
@sam-s
Copy link
Author

sam-s commented Nov 10, 2013

how do I attach the log?

@gaborcsardi
Copy link
Contributor

Did you install the igraph C library? You need to do that before installing the Python package.

@ntamas
Copy link
Member

ntamas commented Nov 11, 2013

FWIW, the easiest way to install the C library on Mac OS X is via Homebrew (http://brew.sh), from the 'science' tap (igraph is not in the base Homebrew tap any more). Once you have done that, pip should be able to figure out on its own where igraph is and link accordingly.

On 11 Nov 2013, at 10:12, Gabor Csardi notifications@github.com wrote:

Did you install the igraph C library? You need to do that before installing the Python package.


Reply to this email directly or view it on GitHub.

@sam-s
Copy link
Author

sam-s commented Nov 11, 2013

I have igraph for R in ~/R/lib/igraph/libs/igraph.so - can it be used?

On Mon, Nov 11, 2013 at 5:01 AM, Tamás Nepusz notifications@github.comwrote:

FWIW, the easiest way to install the C library on Mac OS X is via Homebrew
(http://brew.sh), from the 'science' tap (igraph is not in the base
Homebrew tap any more). Once you have done that, pip should be able to
figure out on its own where igraph is and link accordingly.

On 11 Nov 2013, at 10:12, Gabor Csardi notifications@github.com
wrote:

Did you install the igraph C library? You need to do that before
installing the Python package.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/538#issuecomment-28186075
.

Sam Steingold http://sds.podval.org http://www.childpsy.net/

@gaborcsardi
Copy link
Contributor

That's not a the C library, that file is part of an R package. It's code slightly differs from the C library and you cannot use it for python-igraph.

@gaborcsardi
Copy link
Contributor

So I guess you just did not have the C library installed, and I'll close this issue.

@and0202
Copy link

and0202 commented Feb 25, 2019

Go to homebrew: brew.sh, and install brew for Mac. Then,

brew install cairo
brew install py2cairo
brew install igraph — install C-core
sudo pip install python-igraph —install igraph for python

http://igraph.wikidot.com/installing-python-igraph-on-mac-os-x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants