Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Python interfaces

Date2016-04-07 17:55
FromAndres Cabrera
Subject[Csnd-dev] Python interfaces
Hi,

With the current git I'm getting strange errors when trying to load the python interfaces. Is it just my system?

>>>import csnd6
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/andres/.local/lib/python2.7/site-packages/icsound.py", line 32, in <module>
    import csnd6
  File "csnd6.py", line 28, in <module>
    _csnd6 = swig_import_helper()
  File "csnd6.py", line 24, in swig_import_helper
    _mod = imp.load_module('_csnd6', fp, pathname, description)
ImportError: dynamic module does not define init function (init_csnd6)

Or previously...

>>> import csnd6
  File "csnd6.py", line 28, in <module>
    _csnd6 = swig_import_helper()
  File "csnd6.py", line 24, in swig_import_helper
    _mod = imp.load_module('_csnd6', fp, pathname, description)
ImportError: ./_csnd6.so: undefined symbol: PyInstanceMethod_New

I've really tried to make sure I have no remnants of old builds or installations, but before I go on a deeper search, I just wanted confirmation that its actually working OK...

Cheers,
Andrés

Date2016-04-07 18:06
FromFrancois PINOT
SubjectRe: [Csnd-dev] Python interfaces
Hello Andres,

here it works with a version I built 5 days ago.

Regards

Francois

2016-04-07 18:55 GMT+02:00 Andres Cabrera <mantaraya36@gmail.com>:
Hi,

With the current git I'm getting strange errors when trying to load the python interfaces. Is it just my system?

>>>import csnd6
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/andres/.local/lib/python2.7/site-packages/icsound.py", line 32, in <module>
    import csnd6
  File "csnd6.py", line 28, in <module>
    _csnd6 = swig_import_helper()
  File "csnd6.py", line 24, in swig_import_helper
    _mod = imp.load_module('_csnd6', fp, pathname, description)
ImportError: dynamic module does not define init function (init_csnd6)

Or previously...

>>> import csnd6
  File "csnd6.py", line 28, in <module>
    _csnd6 = swig_import_helper()
  File "csnd6.py", line 24, in swig_import_helper
    _mod = imp.load_module('_csnd6', fp, pathname, description)
ImportError: ./_csnd6.so: undefined symbol: PyInstanceMethod_New

I've really tried to make sure I have no remnants of old builds or installations, but before I go on a deeper search, I just wanted confirmation that its actually working OK...

Cheers,
Andrés


Date2016-04-07 18:26
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Python interfaces
Works here too.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 7 Apr 2016, at 17:55, Andres Cabrera  wrote:
> 
> Hi,
> 
> With the current git I'm getting strange errors when trying to load the python interfaces. Is it just my system?
> 
> >>>import csnd6
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/home/andres/.local/lib/python2.7/site-packages/icsound.py", line 32, in 
>     import csnd6
>   File "csnd6.py", line 28, in 
>     _csnd6 = swig_import_helper()
>   File "csnd6.py", line 24, in swig_import_helper
>     _mod = imp.load_module('_csnd6', fp, pathname, description)
> ImportError: dynamic module does not define init function (init_csnd6)
> 
> Or previously...
> 
> >>> import csnd6
>   File "csnd6.py", line 28, in 
>     _csnd6 = swig_import_helper()
>   File "csnd6.py", line 24, in swig_import_helper
>     _mod = imp.load_module('_csnd6', fp, pathname, description)
> ImportError: ./_csnd6.so: undefined symbol: PyInstanceMethod_New
> 
> I've really tried to make sure I have no remnants of old builds or installations, but before I go on a deeper search, I just wanted confirmation that its actually working OK...
> 
> Cheers,

Date2016-04-07 19:09
FromAndres Cabrera
SubjectRe: [Csnd-dev] Python interfaces
Thanks for the confirmations. How strange... I can't figure it out. I'll keep looking.

Cheers,
Andrés

On Thu, Apr 7, 2016 at 10:26 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Works here too.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 7 Apr 2016, at 17:55, Andres Cabrera <mantaraya36@gmail.com> wrote:
>
> Hi,
>
> With the current git I'm getting strange errors when trying to load the python interfaces. Is it just my system?
>
> >>>import csnd6
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/home/andres/.local/lib/python2.7/site-packages/icsound.py", line 32, in <module>
>     import csnd6
>   File "csnd6.py", line 28, in <module>
>     _csnd6 = swig_import_helper()
>   File "csnd6.py", line 24, in swig_import_helper
>     _mod = imp.load_module('_csnd6', fp, pathname, description)
> ImportError: dynamic module does not define init function (init_csnd6)
>
> Or previously...
>
> >>> import csnd6
>   File "csnd6.py", line 28, in <module>
>     _csnd6 = swig_import_helper()
>   File "csnd6.py", line 24, in swig_import_helper
>     _mod = imp.load_module('_csnd6', fp, pathname, description)
> ImportError: ./_csnd6.so: undefined symbol: PyInstanceMethod_New
>
> I've really tried to make sure I have no remnants of old builds or installations, but before I go on a deeper search, I just wanted confirmation that its actually working OK...
>
> Cheers,
> Andrés


Date2016-04-12 16:38
FromAndres Cabrera
SubjectRe: [Csnd-dev] Python interfaces
Ok, found the problem. The cmake script finds python 3.4 and then links to that, but installs the module for python 2.7. I manually changed the cmake variables after config then generated the makefile and built and now it works. I guess the fix is to make the modules install for the version of python that they are built.

Cheers,
Andrés

On Thu, Apr 7, 2016 at 11:09 AM, Andres Cabrera <mantaraya36@gmail.com> wrote:
Thanks for the confirmations. How strange... I can't figure it out. I'll keep looking.

Cheers,
Andrés

On Thu, Apr 7, 2016 at 10:26 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Works here too.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 7 Apr 2016, at 17:55, Andres Cabrera <mantaraya36@gmail.com> wrote:
>
> Hi,
>
> With the current git I'm getting strange errors when trying to load the python interfaces. Is it just my system?
>
> >>>import csnd6
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/home/andres/.local/lib/python2.7/site-packages/icsound.py", line 32, in <module>
>     import csnd6
>   File "csnd6.py", line 28, in <module>
>     _csnd6 = swig_import_helper()
>   File "csnd6.py", line 24, in swig_import_helper
>     _mod = imp.load_module('_csnd6', fp, pathname, description)
> ImportError: dynamic module does not define init function (init_csnd6)
>
> Or previously...
>
> >>> import csnd6
>   File "csnd6.py", line 28, in <module>
>     _csnd6 = swig_import_helper()
>   File "csnd6.py", line 24, in swig_import_helper
>     _mod = imp.load_module('_csnd6', fp, pathname, description)
> ImportError: ./_csnd6.so: undefined symbol: PyInstanceMethod_New
>
> I've really tried to make sure I have no remnants of old builds or installations, but before I go on a deeper search, I just wanted confirmation that its actually working OK...
>
> Cheers,
> Andrés