Re: [Csnd] A couple of questions about CSound and Python

I'm also interested in using Python to call Csound, as part of a Reinforcement Learning and Q learning project that is written in Python. When I try to execute the first call in the Jupyter notebook "01-the-ctcsound-module.ipynb" I get this error:

----> 1 libcsound = ct.CDLL("libcsound64.so")
OSError: libcsound64.so: cannot open shared object file: No such file or directory

My libcsound64.so.6.0 is in here:

ls /usr/lib64/libcs*.*
/usr/lib64/libcsound64.so.6.0

The libsound request works if I change the name of the module to include the 6.0 in the name.

libcsound = ct.CDLL("libcsound64.so.6.0")
returns True

Is there something I'm doing wrong?

This is a recent install of csound in linux using "sudo yum install csound". Csound works, and says that it is version 6.
--Csound version 6.16 (double samples) Aug 10 2021

Any advice is appreciated.

Prent Rodgers

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

You are supposed to use the ctcsound.py file that is installed by your Csound installer. If you have several installations or an old installation that was not deleted or only incompletely deleted, this could happen. See if you have more than one ctcsound.py file also, and get rid of all that did not come with your installed version of Csound.

Rather than rename files, it is better to create a symbolic link that creates a name that will load that points to the installed file. This is actually usually done for you by installers.

Best,
Mike

I think you are just missing the symlink. Some linux distros only install these with the dev packages. You could either create the symlink yourself or install csound-dev (or whatever it is called).

Prof. Victor Lazzarini
Maynooth University
Ireland