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 -nox version is without QT/qcas graphics dependancies.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
Chose python-giacpy for python2.x or python3-giacpy for Python3.
Install them with dpkg -i But they are also in giac's debian repository:
You can create those debian package with dpkg-buildpackage from the following sources: giacpy_0.4.2.tar.gz.
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.
binaries of giacpy.
To install giacpy on windows, choose the version adapted to your python version and install giacpy in the directory Lib/site-packages of your Python installation. If you are not allowed to do this, put giacpy anywhere and do as in exemple.py.
NB: The french keywords might not be functional with the windows version of giacpy.
See also the trac 15226
SPKG: For the Sage version of giacpy, it is recommended to use the giac-1. x.x.spkg
Some differences with giacpy:
Only: Pygen,libgiac,giacsettings 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 Examples :
Before applying this patch, you might want a small clone of your sage installation to be able to rollback:
sage -clone mytesting (to revert to your original version: sage -branch main)
To apply this patch:
in sage do:
then quit and rebuild sage with:
sage.libs.giac 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
here is also a standalone version untar it (ex in /home/fred) and build it (as explained in INSTALL.txt) with:
sage setup.py build_ext --inplace
and in sage do:
from giacpy import *
Last modified: Sun Oct 20 23:36:22 CEST 2013