[Csnd] Error importing csnd6 in Python3.6

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] Error importing csnd6 in Python3.6

luis antunes pena-4
I'm trying some of these examples https://github.com/csound/csoundAPI_examples/tree/master/python of running csound in python using the API. It looks like python can't load the csnd6 library. Output of the terminal is below.
I have installed python3.6 and csound 6.11 (double samples) May 11 2018 on mac osx 10.12.6.
Any help appreciated.
Luis

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import csnd6
Traceback (most recent call last):
  File "/Library/Python/3.6/site-packages/csnd6.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 922, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dlopen(/Library/Python/3.6/site-packages/_csnd6.so, 2): Symbol not found: _PyClass_Type
  Referenced from: /Library/Python/3.6/site-packages/_csnd6.so
  Expected in: flat namespace
 in /Library/Python/3.6/site-packages/_csnd6.so

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/3.6/site-packages/csnd6.py", line 17, in <module>
    _csnd6 = swig_import_helper()
  File "/Library/Python/3.6/site-packages/csnd6.py", line 16, in swig_import_helper
    return importlib.import_module('_csnd6')
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/Library/Python/3.6/site-packages/_csnd6.so, 2): Symbol not found: _PyClass_Type
  Referenced from: /Library/Python/3.6/site-packages/_csnd6.so
  Expected in: flat namespace
 in /Library/Python/3.6/site-packages/_csnd6.so


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Error importing csnd6 in Python3.6

Victor Lazzarini-2
csnd6 only works on Python 2.*

You need to use ctcsound on Python 3
========================
Prof. 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 3 Jul 2018, at 13:08, luis antunes pena <[hidden email]> wrote:
>
> I'm trying some of these examples https://github.com/csound/csoundAPI_examples/tree/master/python of running csound in python using the API. It looks like python can't load the csnd6 library. Output of the terminal is below.
> I have installed python3.6 and csound 6.11 (double samples) May 11 2018 on mac osx 10.12.6.
> Any help appreciated.
> Luis
> Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31)
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import csnd6
> Traceback (most recent call last):
>   File "/Library/Python/3.6/site-packages/csnd6.py", line 14, in swig_import_helper
>     return importlib.import_module(mname)
>   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
>     return _bootstrap._gcd_import(name[level:], package, level)
>   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
>   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
>   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
>   File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
>   File "<frozen importlib._bootstrap>", line 571, in module_from_spec
>   File "<frozen importlib._bootstrap_external>", line 922, in create_module
>   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
> ImportError: dlopen(/Library/Python/3.6/site-packages/_csnd6.so, 2): Symbol not found: _PyClass_Type
>   Referenced from: /Library/Python/3.6/site-packages/_csnd6.so
>   Expected in: flat namespace
>  in /Library/Python/3.6/site-packages/_csnd6.so
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/Library/Python/3.6/site-packages/csnd6.py", line 17, in <module>
>     _csnd6 = swig_import_helper()
>   File "/Library/Python/3.6/site-packages/csnd6.py", line 16, in swig_import_helper
>     return importlib.import_module('_csnd6')
>   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
>     return _bootstrap._gcd_import(name[level:], package, level)
> ImportError: dlopen(/Library/Python/3.6/site-packages/_csnd6.so, 2): Symbol not found: _PyClass_Type
>   Referenced from: /Library/Python/3.6/site-packages/_csnd6.so
>   Expected in: flat namespace
>  in /Library/Python/3.6/site-packages/_csnd6.so
>
>
> --
>
> http://luisantunespena.eu
> http://sumtone.com
> Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Error importing csnd6 in Python3.6

luis antunes pena-4

Thanks Victor.

After installing numpy I have this error:

>>> import ctcsound
sh: sysctl: command not found

This is probably due to the fact that I'm running a tcsh shell and not a bash one. Is there something I can do to import the library without havng to change the shell?

Thanks,

Luis


Am 03.07.18 um 14:10 schrieb Victor Lazzarini:
csnd6 only works on Python 2.*

You need to use ctcsound on Python 3
========================
Prof. 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 3 Jul 2018, at 13:08, luis antunes pena [hidden email] wrote:

I'm trying some of these examples https://github.com/csound/csoundAPI_examples/tree/master/python of running csound in python using the API. It looks like python can't load the csnd6 library. Output of the terminal is below.
I have installed python3.6 and csound 6.11 (double samples) May 11 2018 on mac osx 10.12.6.
Any help appreciated.
Luis
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import csnd6
Traceback (most recent call last):
  File "/Library/Python/3.6/site-packages/csnd6.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 922, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dlopen(/Library/Python/3.6/site-packages/_csnd6.so, 2): Symbol not found: _PyClass_Type
  Referenced from: /Library/Python/3.6/site-packages/_csnd6.so
  Expected in: flat namespace
 in /Library/Python/3.6/site-packages/_csnd6.so

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/3.6/site-packages/csnd6.py", line 17, in <module>
    _csnd6 = swig_import_helper()
  File "/Library/Python/3.6/site-packages/csnd6.py", line 16, in swig_import_helper
    return importlib.import_module('_csnd6')
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/Library/Python/3.6/site-packages/_csnd6.so, 2): Symbol not found: _PyClass_Type
  Referenced from: /Library/Python/3.6/site-packages/_csnd6.so
  Expected in: flat namespace
 in /Library/Python/3.6/site-packages/_csnd6.so


-- 

http://luisantunespena.eu
http://sumtone.com
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Error importing csnd6 in Python3.6

Francois PINOT
On some Macs, sysctl is located in /sbin/ instead of /usr/sbin/. You should add /sbin to your PATH variable (I'm supposing you're using a Mac, aren't you?)

François

2018-07-03 14:27 GMT+02:00 luis antunes pena <[hidden email]>:

Thanks Victor.

After installing numpy I have this error:

>>> import ctcsound
sh: sysctl: command not found

This is probably due to the fact that I'm running a tcsh shell and not a bash one. Is there something I can do to import the library without havng to change the shell?

Thanks,

Luis


Am 03.07.18 um 14:10 schrieb Victor Lazzarini:
csnd6 only works on Python 2.*

You need to use ctcsound on Python 3
========================
Prof. 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 3 Jul 2018, at 13:08, luis antunes pena [hidden email] wrote:

I'm trying some of these examples https://github.com/csound/csoundAPI_examples/tree/master/python of running csound in python using the API. It looks like python can't load the csnd6 library. Output of the terminal is below.
I have installed python3.6 and csound 6.11 (double samples) May 11 2018 on mac osx 10.12.6.
Any help appreciated.
Luis
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import csnd6
Traceback (most recent call last):
  File "/Library/Python/3.6/site-packages/csnd6.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 922, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dlopen(/Library/Python/3.6/site-packages/_csnd6.so, 2): Symbol not found: _PyClass_Type
  Referenced from: /Library/Python/3.6/site-packages/_csnd6.so
  Expected in: flat namespace
 in /Library/Python/3.6/site-packages/_csnd6.so

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/3.6/site-packages/csnd6.py", line 17, in <module>
    _csnd6 = swig_import_helper()
  File "/Library/Python/3.6/site-packages/csnd6.py", line 16, in swig_import_helper
    return importlib.import_module('_csnd6')
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/Library/Python/3.6/site-packages/_csnd6.so, 2): Symbol not found: _PyClass_Type
  Referenced from: /Library/Python/3.6/site-packages/_csnd6.so
  Expected in: flat namespace
 in /Library/Python/3.6/site-packages/_csnd6.so


-- 

http://luisantunespena.eu
http://sumtone.com
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Error importing csnd6 in Python3.6

luis antunes pena-4

Thank you François. I'm on mac os 10.12.6. I found sysctl in /usr/sbin and now both /sbin and /usr/sbin are added to PATH and I can load the library ctcsound. Thanks!

Am 03.07.18 um 14:38 schrieb Francois PINOT:
On some Macs, sysctl is located in /sbin/ instead of /usr/sbin/. You should add /sbin to your PATH variable (I'm supposing you're using a Mac, aren't you?)

François

2018-07-03 14:27 GMT+02:00 luis antunes pena <[hidden email]>:

Thanks Victor.

After installing numpy I have this error:

>>> import ctcsound
sh: sysctl: command not found

This is probably due to the fact that I'm running a tcsh shell and not a bash one. Is there something I can do to import the library without havng to change the shell?

Thanks,

Luis


Am 03.07.18 um 14:10 schrieb Victor Lazzarini:
csnd6 only works on Python 2.*

You need to use ctcsound on Python 3
========================
Prof. 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 3 Jul 2018, at 13:08, luis antunes pena [hidden email] wrote:

I'm trying some of these examples https://github.com/csound/csoundAPI_examples/tree/master/python of running csound in python using the API. It looks like python can't load the csnd6 library. Output of the terminal is below.
I have installed python3.6 and csound 6.11 (double samples) May 11 2018 on mac osx 10.12.6.
Any help appreciated.
Luis
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import csnd6
Traceback (most recent call last):
  File "/Library/Python/3.6/site-packages/csnd6.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 922, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dlopen(/Library/Python/3.6/site-packages/_csnd6.so, 2): Symbol not found: _PyClass_Type
  Referenced from: /Library/Python/3.6/site-packages/_csnd6.so
  Expected in: flat namespace
 in /Library/Python/3.6/site-packages/_csnd6.so

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/3.6/site-packages/csnd6.py", line 17, in <module>
    _csnd6 = swig_import_helper()
  File "/Library/Python/3.6/site-packages/csnd6.py", line 16, in swig_import_helper
    return importlib.import_module('_csnd6')
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/Library/Python/3.6/site-packages/_csnd6.so, 2): Symbol not found: _PyClass_Type
  Referenced from: /Library/Python/3.6/site-packages/_csnd6.so
  Expected in: flat namespace
 in /Library/Python/3.6/site-packages/_csnd6.so


-- 

http://luisantunespena.eu
http://sumtone.com
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here