installation of pynauty on a server

Introduction

Pynauty is a Python/C extension module. It can be used to compare graphs for isomorphism and to determine their automorphism group. It is based on the Nauty C procedures.

Issues I met

  1. I have a server access without root authority. I want to deploy the package on the server but ./configure doesn’t work.

Deploying procedures

  • Download pynauty source file and put them into one dir.
  • Download nauty source file, unzip them, put them into a folder called nauty under pynauty dir.
  • cd into the nauty dir, input
    $ source activate
    $ bash CFLAGS=-fPIC ./configure
    $ make
    
  • cd into pynauty dir, input:
    ln -s ../nauty* nauty
  • Modify the extra_objects argument in setup.py:
# from
extra_objects = [ nauty_dir + '/' + 'nauty.so', ],
                      nauty_dir + '/' + 'nautil.o',
                      nauty_dir + '/' + 'naugraph.o'
                    ],
# change it to
extra_objects = [nauty_dir + '/' + 'nauty.a'],

You can find extra_objects by searching for key words and change it like the form.

  • python setup.py build
  • python setup.py install

Conclusion

Here it goes, I can import pynauty package in my environment. Before that, I have installed anaconda on my end.