Last active
July 2, 2019 07:28
-
-
Save kpj/fc5570b9ebd77644c49739a340de42db to your computer and use it in GitHub Desktop.
Compile and install the latest version of python-igraph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -eu | |
#https://github.com/igraph/python-igraph/issues/157 | |
#https://github.com/Homebrew/homebrew-core/blob/master/Formula/igraph.rb | |
#https://github.com/gephi/gephi/wiki/GraphStreaming#Server_Module | |
wd="tmp" | |
rm -rf "$wd" && mkdir "$wd" | |
cd "$wd" | |
# get python-package source | |
git clone https://github.com/igraph/python-igraph/ | |
cd python-igraph | |
# retrieve and compile igraph C-core | |
git clone https://github.com/igraph/igraph igraphcore | |
cd igraphcore | |
./bootstrap.sh | |
mkdir _build && cd _build | |
../configure --prefix=$PWD/../_install | |
make -j4 | |
make install | |
cd ../../ | |
# install python package | |
# `--prefix=` is a fix for "error: can't combine user with prefix, exec_prefix/home, or install_(plat)base" | |
CPPFLAGS=-I$PWD/igraphcore/_install/include/igraph \ | |
LDFLAGS=-L$PWD/igraphcore/_install/lib \ | |
PKG_CONFIG_PATH=igraphcore/_install/lib/pkgconfig/ \ | |
python3 setup.py install --user --prefix= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wonderful! I am glad to hear it was of help.
And you are very correct, I replaced line 23 with
cd ../../
.If you have successfully installed the Python package to another directory, it should be fine to get rid of
tmp
.