Alex Saad
Alex Saad

Reputation: 111

Problems installing Flagmatic

I'm trying to install Flagmatic on Mac OS X Yosemite, a software package used to solve problems in extremal graph theory using the "flag algebras" developed by Razborov. I'd like to use Flagmatic to help with a research problem I'm working on, but I'm finding it very difficult to install. I'm a mathematician and while I've had some experience using Sage and Python through the Terminal I don't really know how to fix the sort of problems that I'm running into here. Here's the most up-to-date user guide so you can follow what I'm trying to do. I can broadly break down the problem as follows:

First, there is a link in the user guide to download the semidefinite programming package CSDP which Flagmatic needs in order to do some calculations. You then need to move CSDP to somewhere Flagmatic can find it, so I typed

sudo cp ~/Downloads/csdp/usr/local/bin/

into Terminal, which seemed to work. Then the user guide says by typing

csdp

into Terminal it should launch CSDP. This doesn't work - I get a permission denied message even though I typed sudo. Can anyone explain why this is happening and how to remedy it?

Secondly, when I run Sage (maths software) in the Terminal, I then want to be able to change directory to the pkg folder where there is a script called setup.py. When I run sage and type

python setup.py install

or

-python setup.py install

while in the pkg directory, I get an invalid syntax message with a pointer to the particular phrase setup.py. This is what the user guide tells you to do. If I instead try to install outside of Sage I get an error message The environment variable SAGE_ROOT must be defined. Can anyone provide some explanation and help with how to fix this?

Upvotes: 1

Views: 246

Answers (2)

srobik
srobik

Reputation: 11

I might udpate the documentation in the near future. For now, however, you might want to visit this: https://github.com/jsliacan/flagmatic-2.0.git. I keep Emil's copy of Flagmatic 2.0 with updated install info. If you follow the README file, you should be fine.

I just built sage on Yosemite from source (worked fine) and then installed Flagmatic 2.0 (or Flagmatic-dev) without difficulties. It should work for you too.

I hope this helps.

Upvotes: 1

kcrisman
kcrisman

Reputation: 4402

Wow, this is somewhat dated information that they provide, since for well over a year csdp is an experimental Sage package. You should be able to just do

sage -i csdp

to install it (if you have compiler tools, which you probably do in this case). I guess the old instructions would still work but are a little brittle w.r.t. Sage.

Anyway, to the actual problem. You need to do the exact command given in the instructions:

sage -python setup.py install

However, this assumes (!) that you have a sage command in your PATH. Which you may not!

In this case, I recommend you use whatever command you use to run Sage, but instead of just typing /commmand/for/sage do /command/for/sage -python setup.py install in that directory. It will have all the right environment variables set up so that it installs in the right place, I am guessing.

Now, I'm not sure why flagmatic isn't just having themselves become an upstream package on the Sage servers, but that is a question that is harder to answer.

Upvotes: 1

Related Questions