This gives a python class (Pygen) which works with pointer to giac gen. There is a version for python and another one for sage.
The Giac/Xcas Forum is a good place to ask questions about giacpy.
To have graphic support, you first need to build the libqcas (qmake libqcas.pro;make). then on linux install giacpy with:
python setup.py install ( or just build it with: ) python setup.py build_ext
Debian Packages  are avaible in Giac/Xcas debian repository:
Chose python-giacpy for python2.x or python3-giacpy for Python3.But if your python version/subversion is not supported in these debian package look here:
The python version and subversion must match yours, and the architecture (32bits/64bits) too. The .whl or .tar.gz are just 2 different ways to distribute the same thing.
Choose the appropirate version : On macosx 10.6 the default python version is 2.6, and for osx 10.7 and 10.8 it is python 2.7. The .pkg files are macosx installer. They require adminitrator rights. If you can't install giacpy from the .pkg files, then you can consider giacpy.dmg. It is a portable version of giacpy and can be installed anywhere. But you will need to adjust your python path. Cf the README file in giacpy.app.
New style spkg of giacpy:
For the giac and giacpy spkg, see also the trac 12375 (closed in sage 6.8)
Some differences with the python version of giacpy:
Only: Pygen,libgiac,giacsettings,loadgiacgen are exported by import *. (There are too many words in sage that whould be overwriten. ex gcd...)
The qcas output, htmlhelp are disabled. It has some extra features like Pygen gets sage Integers directly from mpz_t,
Warning. in sage the giac command calls the external giac program. To use this interface use libgiac.
Some sage/giacpy Examples :
Groebner basis over QQ of cyclic9 in sage with giacpy and magma and the sage worksheet
The magma 2.20-10 result was not imported in sage.
The computation is around 7h or 8h of Wall time, but 49h of CPU time for giacpy.
giacpy import *
I = sage.rings.ideal.Katsura(R,n);
time B = I.groebner_basis("libsingular:std") # to compute with singular. about 18s on my notebook.
time Bgiac=Igiac.gbasis([R.gens()],'revlex') # about 3s on my notebook
giacsettings.proba_epsilon=0; # impose deterministic algorithm
time Bgiac=Igiac.gbasis([R.gens()],'revlex') # about 25s on my notebook
simplify(Bgiac[-1]/B) # a big constant
sage setup.py install
sage setup.py build_ext --inplace
and in sage do:
from giacpy import *
Last modified: Sat Nov 19 18:08:28 CET 2016