Hi,
After updating ctcsound (I need to do it manually due to my Anaconda configuration), I found that importing ctcsound results in error.
I tried ctcsound from csound-MacOS_x86_64-6.16.2.dmg and Csound source repository, but both cannot be imported. The error message is attached below.
Is there any conflict with Python version?
MacBook Pro(Intel)
MacOS 11.6.1(BigSur)
Csound v6.16.2(installed from dmg)
Python 3.8.11
JupyterLab3.2.1
Importing ctcsound from Csound 6.16.2 installer
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/var/folders/08/p6f034s48xjbh80059bry1jr0000gn/T/ipykernel_5697/205267035.py in <module>
----> 1 import ctcsound
~/.pyenv/versions/anaconda3-2019.10/envs/dev38/lib/python3.8/site-packages/ctcsound.py in <module>
2703 sys.exit("Don't know your system! Exiting...")
2704
-> 2705 libcspt.NewCsoundPT.restype = ct.c_void_p
2706 libcspt.NewCsoundPT.argtypes = [ct.c_void_p]
2707 libcspt.DeleteCsoundPT.argtypes = [ct.c_void_p]
~/.pyenv/versions/anaconda3-2019.10/envs/dev38/lib/python3.8/ctypes/__init__.py in __getattr__(self, name)
384 if name.startswith('__') and name.endswith('__'):
385 raise AttributeError(name)
--> 386 func = self.__getitem__(name)
387 setattr(self, name, func)
388 return func
~/.pyenv/versions/anaconda3-2019.10/envs/dev38/lib/python3.8/ctypes/__init__.py in __getitem__(self, name_or_ordinal)
389
390 def __getitem__(self, name_or_ordinal):
--> 391 func = self._FuncPtr((name_or_ordinal, self))
392 if not isinstance(name_or_ordinal, int):
393 func.__name__ = name_or_ordinal
AttributeError: dlsym(RTLD_DEFAULT, NewCsoundPT): symbol not found
Importing ctcsound from Csound source repository
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/var/folders/08/p6f034s48xjbh80059bry1jr0000gn/T/ipykernel_5758/205267035.py in <module>
----> 1 import ctcsound
~/.pyenv/versions/anaconda3-2019.10/envs/dev38/lib/python3.8/site-packages/ctcsound.py in <module>
421 libcsound.csoundCreateThread.restype = ct.c_void_p
422 libcsound.csoundCreateThread.argtypes = [THREADFUNC, ct.py_object]
--> 423 libcsound.csoundCreateThread2.restype = ct.c_void_p
424 libcsound.csoundCreateThread2.argtypes = [THREADFUNC, ct.c_uint, ct.py_object]
425 libcsound.csoundGetCurrentThreadId.restype = ct.c_void_p
~/.pyenv/versions/anaconda3-2019.10/envs/dev38/lib/python3.8/ctypes/__init__.py in __getattr__(self, name)
384 if name.startswith('__') and name.endswith('__'):
385 raise AttributeError(name)
--> 386 func = self.__getitem__(name)
387 setattr(self, name, func)
388 return func
~/.pyenv/versions/anaconda3-2019.10/envs/dev38/lib/python3.8/ctypes/__init__.py in __getitem__(self, name_or_ordinal)
389
390 def __getitem__(self, name_or_ordinal):
--> 391 func = self._FuncPtr((name_or_ordinal, self))
392 if not isinstance(name_or_ordinal, int):
393 func.__name__ = name_or_ordinal
AttributeError: dlsym(0x7fcc4f787270, csoundCreateThread2): symbol not found