Cabbage Logo
Back to Cabbage Site

Ctcsound will not import to pycharm

Hey everyone. Super new to csound and I’m trying to import ctcsound in my python program. When I write the “import ctcsound” statement, it shows this error:

Traceback (most recent call last):
File “C:/Users/pvedi/PycharmProjects/Data_Sonification_Class/Paul_Vedier_Soni1.py”, line 1, in
import ctcsound
File “C:\Program Files\Csound6_x64\bin\ctcsound.py”, line 31, in
libcsound = cdll.csound64
File “C:\Users\pvedi\AppData\Local\Programs\Python\Python36-32\lib\ctypes_init_.py”, line 418, in getattr
dll = self.dlltype(name)
File "C:\Users\pvedi\AppData\Local\Programs\Python\Python36-32\lib\ctypes_init
.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

I have no idea why this is happening and my teacher yelled at me in class for asking if he knew how to fix the issue. Any help or suggestions at all would be incredibly helpful. Thank you!

Sorry your teacher barked at you. You should bark back! What version of Csound are you using? I had some issues with this on Windows recently, but it all started working fine when I installed ActivePython. Check this thread:
http://csound.1045644.n5.nabble.com/Csnd-ctcsound-td5763188.html
It might help some.