Csound Csound-dev Csound-tekno Search About

Re: [Csnd] Installing the python plugins on Linux

Date2023-06-04 19:43
FromPrent Rodgers
SubjectRe: [Csnd] Installing the python plugins on Linux
Mike, I think I made some progress on this.
I get through running cmake, but stall out with an inability to find the python libraries.
I start out in my csound source code library obtained by cloning 

     mkdir build
     cd build
     cmake ..

- Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES Development Development.Module Development.Embed) (found version "3.11.3")
-- Python include dirs:   _Python3_INCLUDE_DIR-NOTFOUND
-- Python libraries:   Python3_LIBRARY-NOTFOUND
-- Python3_FOUND="FALSE", so disabling BUILD_PYTHON_OPCODES
-- BUILD_PYTHON_OPCODES is disabled.

So I think I might have to let cmake know where it can find my python. I have it installed here:
     which python
~/virtual_python3.11/bin/python

How do I tell cmake where python is?

Prent

Csound mailing list
Csound@listserv.heanet.ie
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

Date2023-06-05 02:26
FromMichael Gogins
SubjectRe: [Csnd] Installing the python plugins on Linux
Assuming you have built in a build directory, change to that directory and delete CMakeCache.txt (NOT CMakLists.txt).

Make sure you have Python3 installed! Run "python3" and see what you get.

Re-run cmake but define the variables locating the Python dependencies yourself, like this:

cmake .. -DPYTHON_INCLUDE_DIRS=wherever_they_are -DPYTHON_LIBRARIES=wherever_they_are

In general, you can set any CMake variable from the cmake command line. Doing this should override what CMakeLists.txt thinks.

Then try running make again. 
                                                
-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Sun, Jun 4, 2023 at 2:43 PM Prent Rodgers <prent.rodgers@gmail.com> wrote:
Mike, I think I made some progress on this.
I get through running cmake, but stall out with an inability to find the python libraries.
I start out in my csound source code library obtained by cloning

     mkdir build
     cd build
     cmake ..

- Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES Development Development.Module Development.Embed) (found version "3.11.3")
-- Python include dirs:   _Python3_INCLUDE_DIR-NOTFOUND
-- Python libraries:   Python3_LIBRARY-NOTFOUND
-- Python3_FOUND="FALSE", so disabling BUILD_PYTHON_OPCODES
-- BUILD_PYTHON_OPCODES is disabled.

So I think I might have to let cmake know where it can find my python. I have it installed here:
     which python
~/virtual_python3.11/bin/python

How do I tell cmake where python is?

Prent

Csound mailing list
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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

Date2023-06-06 23:34
FromAaron Krister Johnson
SubjectRe: [Csnd] Installing the python plugins on Linux
Hi Prent!

What OS is this? On Ubuntu/MINT Linux, if you're using a "system Python3", you'd do something like:

sudo apt install python3.11-dev

So, whatever the equivalent of grabbing Python3 source header files is on your OS.

Alternatively, you can install pyenv, have build tools to build any python interpreter you want, and whatever Python you install would live as a hidden dir in your home (e.g. `~/.pyenv/versions/...` on Linux/Mac)...you could then link the header "include" and library "lib" directories into e.g. /usr/local/[include|lib]

(I am assuming a unix-y OS here, I'm not familiar with what nightmarish nonsense exists in Windows-land.)

Anyhow, once you do that, you'd need to let the Csound compiling process configuration properly detect the Python3 headers...you might have to give the config a clue, though.



On Sun, Jun 4, 2023 at 11:43 AM Prent Rodgers <prent.rodgers@gmail.com> wrote:
Mike, I think I made some progress on this.
I get through running cmake, but stall out with an inability to find the python libraries.
I start out in my csound source code library obtained by cloning

     mkdir build
     cd build
     cmake ..

- Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES Development Development.Module Development.Embed) (found version "3.11.3")
-- Python include dirs:   _Python3_INCLUDE_DIR-NOTFOUND
-- Python libraries:   Python3_LIBRARY-NOTFOUND
-- Python3_FOUND="FALSE", so disabling BUILD_PYTHON_OPCODES
-- BUILD_PYTHON_OPCODES is disabled.

So I think I might have to let cmake know where it can find my python. I have it installed here:
     which python
~/virtual_python3.11/bin/python

How do I tell cmake where python is?

Prent

Csound mailing list
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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