Read-only forum archive

Any plans for external Python library for singular?

Any plans for external Python library for singular?

jcapco · Wed Dec 12, 2018 4:32 pm

Hi,

I know this question is maybe not very welcome (esp. to developers). I apologize in advance.

I was just wondering if the Singular team has any plans of offering a (standalone) python library that is not sage-dependent (or is there such a thing already?). If the sage integration is not terribly difficult I could try to disconnect any dependencies to any sage modules to get this but I fear the current sage integration is very much dependent on (many?) sage modules. I ask this because in the past few years, other CAS are already offering this (independent of sage which is rather heavy imo) among them is: cypari (developed by sage people I think, but it is very standalone and can be installed as a pip wheel without any sage), giacpy (which I use heavily but I lack some of the functionality that I would really like to have available from singular).

Jose

Re: Any plans for external Python library for singular?

hannes · Fri Dec 14, 2018 6:36 pm

The interface to Singular is libSingular - a C++ library.
There are no plans from our group to extend this to python
- we are working on an julia interface.
(https://oscar.computeralgebra.de/)

Re: Any plans for external Python library for singular?

redtrumpet · Wed Feb 27, 2019 11:01 pm

There is PySingular, which you might try out.

Re: Any plans for external Python library for singular?

jcapco · Wed Apr 10, 2019 4:38 am

redtrumpet wrote:
There is PySingular, which you might try out.


I did try to install PySingular using pip install but it seems to fail:
Code:
Collecting PySingular
  Downloading https://files.pythonhosted.org/packages/5b/6a/f2d0b7cb581a6a0795d421a393ef63fdc773516ce69de200ceaf052d6a63/PySingular-0.9.7.tar.gz
    Complete output from command python setup.py egg_info:
    Package singular was not found in the pkg-config search path.
    Perhaps you should add the directory containing `singular.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'singular' found
    Could not find a suitable libsingular configuration. Do you have libsingular headers installed?


I could try adding PKG_CONFIG_PATH to my system environment but I suspect there is something more to it, i.e. a compilation using only linux operating system (the fact that it downloads tar.gz makes me suspect this even more). Can it be that PySingular (I tried using pip install) can only be used in a linux system?

Re: Any plans for external Python library for singular?

jcapco · Wed Apr 10, 2019 4:41 am

hannes wrote:
The interface to Singular is libSingular - a C++ library.
There are no plans from our group to extend this to python
- we are working on an julia interface.
(https://oscar.computeralgebra.de/)


Ah thanks. At least there is a direction towards a more powerful and "mainstream" scripting language. I confess I never programmed in julia but after taking a quick I have the impression that importing some non-julia python modules may be possible there and the added fact that it performs faster than python is already a bonus. I will give this a try. Thank you for suggesting this.

Edit: I ran Pkg.add with julia 1.1 64bit under Windows 10. Singular could not be compiled (are you interested in the stacktrace?). I suspect, again, this is because singular package in julia is intended only for linux users. Please correct me otherwise.