Hi list, Is py/pyext still usable? I cant't make it working. I use PD 0.48 and 0.50 on another system, I tried to install from Ubuntu/Mint repositories, then with Deken, but still "couldn't create..."
I made a nice plot with Python/MatPlotLib, the data come in from a PD patch.
Thank you for your help
rph-r
On 5/10/20 12:52 AM, Raphael Raccuia wrote:
Hi list, I cant't make it working. I use PD 0.48 and 0.50 on another system, I tried to install from Ubuntu/Mint repositories, then with Deken, but still "couldn't create..."
how do you try to load them? run Pd with "-verbose" and see what you get (where the external is searched for). watch the Pd-console for errors. watch the terminal for errors.
i wouldn't trust the deken package to work correctly for a binary with complex dependencies such as python.
using the Debian package "pd-py" (which is what you get when installing from Ubuntu/Mint repositories), the [py] object instantiates just fine:
------------------------------------------------
py/pyext 0.2.2 - python script objects
(C)2002-2015 Thomas Grill - http://grrrr.org/ext
using Python 2.7.18 (default, Apr 20 2020, 20:30:41)
[GCC 9.3.0]
Python array support enabled
----------------------------------------------
since you seem to be using "Pd 0.48 and Pd-0.50" on Mint, i guess you have compiled Pd yourself and it's either installed into /usr/local/ or not at all. in this case your self-compiled Pd will not automatically search in the paths where the Debian packages installs the external to: so you should add "/usr/lib/pd/extra" to your search-paths.
Is py/pyext still usable?
well, py/pyext as released is Python2.7 only, and Python2.7 has seen EOL a couple of months ago. there has been some work towards making it work with Python3, but nothing has been released yet.
fgmasd IOhannes
Hi Johannes, thank you,
Le 10.05.20 à 20:56, IOhannes m zmölnig a écrit :
On 5/10/20 12:52 AM, Raphael Raccuia wrote:
Hi list, I cant't make it working. I use PD 0.48 and 0.50 on another system, I tried to install from Ubuntu/Mint repositories, then with Deken, but still "couldn't create..."
how do you try to load them?
I tried with [import] (seems to be deprecated), [declare], /path/ settings, /startup/ settings (/py/ in /flags/): all says :/py: can't load library/
run Pd with "-verbose" and see what you get (where the external is searched for). watch the Pd-console for errors. watch the terminal for errors.
well, with _-verbose_ checked in path window, a long list of paths /failed/, and two /succeeded/, but with message: //usr/lib/pd/extra/py/py.pd_linux: /usr/lib/pd/extra/py/py.pd_linux: undefined symbol: _ZTI17flext_base_shared/ and bellow: //usr/lib/pd/extra/py/py.pd_linux: /usr/lib/pd/extra/py/py.pd_linux: undefined symbol: _ZTI17flext_base_shared/
i wouldn't trust the deken package to work correctly for a binary with complex dependencies such as python.
ok...
using the Debian package "pd-py" (which is what you get when installing from Ubuntu/Mint repositories), the [py] object instantiates just fine:
yes, it's what I use
------------------------------------------------ py/pyext 0.2.2 - python script objects (C)2002-2015 Thomas Grill - http://grrrr.org/ext using Python 2.7.18 (default, Apr 20 2020, 20:30:41) [GCC 9.3.0] Python array support enabled ----------------------------------------------
since you seem to be using "Pd 0.48 and Pd-0.50" on Mint, i guess you have compiled Pd yourself and it's either installed into /usr/local/ or not at all.
no compilation, 0.48.1 comes from Mint 19 repos, and 0.50 from Kubuntu/KXStudio repos.
in this case your self-compiled Pd will not automatically search in the paths where the Debian packages installs the external to: so you should add "/usr/lib/pd/extra" to your search-paths.
Is py/pyext still usable?
well, py/pyext as released is Python2.7 only, and Python2.7 has seen EOL a couple of months ago. there has been some work towards making it work with Python3, but nothing has been released yet.
wow, I didn't noticed that. I hope I can use matPlotLib with 2.7. Thank you! rph-r
fgmasd IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 5/11/20 12:21 AM, Raphael Raccuia wrote:
well, with _-verbose_ checked in path window, a long list of paths /failed/, and two /succeeded/,
cool.
but with message: //usr/lib/pd/extra/py/py.pd_linux: /usr/lib/pd/extra/py/py.pd_linux: undefined symbol: _ZTI17flext_base_shared/ and bellow: //usr/lib/pd/extra/py/py.pd_linux: /usr/lib/pd/extra/py/py.pd_linux: undefined symbol: _ZTI17flext_base_shared/
hmm, it seems it cannot find flext. (a dependency of py/pyext.
what's the output of the followin (esp. lines with "not found"):
ldd /usr/lib/pd/extra/py/py.pd_linux
do you have a file "/usr/lib/x86_64-linux-gnu/libflext-pd.so.0" (adjust to your architecture if its not amd64).
what's the exact versions of the pd-py and libflext-pd0 packages?
gfmdsar IOhannes
ok, it seems we are on the right path,
Le 11.05.20 à 09:18, IOhannes m zmölnig a écrit :
On 5/11/20 12:21 AM, Raphael Raccuia wrote:
well, with _-verbose_ checked in path window, a long list of paths /failed/, and two /succeeded/,
cool.
but with message: //usr/lib/pd/extra/py/py.pd_linux: /usr/lib/pd/extra/py/py.pd_linux: undefined symbol: _ZTI17flext_base_shared/ and bellow: //usr/lib/pd/extra/py/py.pd_linux: /usr/lib/pd/extra/py/py.pd_linux: undefined symbol: _ZTI17flext_base_shared/
hmm, it seems it cannot find flext. (a dependency of py/pyext.
flext, was not installed, at least the Ubuntu package... so, after installation (still not working):
what's the output of the followin (esp. lines with "not found"):
ldd /usr/lib/pd/extra/py/py.pd_linux
$ ldd /usr/lib/pd/extra/py/py.pd_linux linux-vdso.so.1 (0x00007ffc57df7000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff3c009d000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff3bfcac000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff3bfa94000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff3bf6f6000) /lib64/ld-linux-x86-64.so.2 (0x00007ff3c0649000)
do you have a file "/usr/lib/x86_64-linux-gnu/libflext-pd.so.0" (adjust to your architecture if its not amd64).
yes, in that path, but it's of type: /link to unknown/. there are to bin: libflext-pd.so.0.0.0 and libflext-pd_d.so.0
what's the exact versions of the pd-py and libflext-pd0 packages?
flext: 0.6.0+git20161101.1.01318a94-3 pd-py: 0.2.2+git20170625.1.88fc77a-2
thank you! rph-r
gfmdsar IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->https://lists.puredata.info/listinfo/pd-list
On 5/11/20 12:06 PM, Raphael Raccuia wrote:
hmm, it seems it cannot find flext. (a dependency of py/pyext.
flext, was not installed, at least the Ubuntu package...
that seems quite broken. libflext-pd0 should be a required dependency of the pd-py package.
however, comparing [1] and [2] it seems that the Ubuntu-package are broken whereas the Debian-package is not, even though both have the very same version ("0.2.2+git20170625.1.88fc77a-2"). i have no idea who is to blame, and how to fix this (while being responsible for the Debian package, i have no direct connection to Ubuntu).
you *might* have luck installing the package for Debian/buster (but you might as well not).
you could file a bug report with ubuntu (using the "reportbug" tool), but i don't think that there's a realistic chance to get a fix into bionic or eoan, and because of the Python2.7 EOL, pd-py is no longer part of focal, and will only be re-introduced into any official release of Debian/Ubuntu/... once there's Python3 support.
sorry.
grdsam IOhannes
[1] https://packages.ubuntu.com/bionic/pd-py [2] https://packages.debian.org/buster/pd-py
well, thank you anyway... I tried matPlotLib with Python 2.7, my script doesn't work, at least as it is. So maybe it's easier to wait pd-py for Python3. If you have any idea how to bind Pd to that script, it's welcome. I'll try something simple with [shell].
By the way, I'm confused on the way to load externals, since there are not loaded after Ubuntu packages install: I tried with [declare], but often it doesn't find libs, probably a path issue, since PD never searches in the right directory (seen with path verbose). It seems the path is relative to the patch, or to PD (-std...). For example with _ggee_, I had to add the absolute path in the settings. Are deb packages supposed to configure that?
Le 12.05.20 à 10:40, IOhannes m zmölnig a écrit :
On 5/11/20 12:06 PM, Raphael Raccuia wrote:
hmm, it seems it cannot find flext. (a dependency of py/pyext.
flext, was not installed, at least the Ubuntu package...
that seems quite broken. libflext-pd0 should be a required dependency of the pd-py package.
however, comparing [1] and [2] it seems that the Ubuntu-package are broken whereas the Debian-package is not, even though both have the very same version ("0.2.2+git20170625.1.88fc77a-2"). i have no idea who is to blame, and how to fix this (while being responsible for the Debian package, i have no direct connection to Ubuntu).
you *might* have luck installing the package for Debian/buster (but you might as well not).
you could file a bug report with ubuntu (using the "reportbug" tool), but i don't think that there's a realistic chance to get a fix into bionic or eoan, and because of the Python2.7 EOL, pd-py is no longer part of focal, and will only be re-introduced into any official release of Debian/Ubuntu/... once there's Python3 support.
sorry.
grdsam IOhannes
[1] https://packages.ubuntu.com/bionic/pd-py [2] https://packages.debian.org/buster/pd-py
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 5/12/20 11:16 AM, Raphael Raccuia wrote:
well, thank you anyway... I tried matPlotLib with Python 2.7, my script doesn't work, at least as it is. So maybe it's easier to wait pd-py for Python3. If you have any idea how to bind Pd to that script, it's welcome. I'll try something simple with [shell].
By the way, I'm confused on the way to load externals, since there are not loaded after Ubuntu packages install
that's by design. installing a program doesn't automatically run it. installing an external doesn't automatically load it.
: I tried with [declare], but often it doesn't find libs, probably a path issue, since PD never searches in the right directory (seen with path verbose). It seems the path is relative to the patch, or to PD (-std...). For example with _ggee_, I had to add the absolute path in the settings. Are deb packages supposed to configure that?
no. they are supposed to just work (and generally do).
there are two issues why it doesn't work for you:
objects (e.g. zexy), other libraries put one binary for each object into a directory (e.g. bsaylor). they need to be loaded differently. e.g. [declare -lib zexy] vs [declare -path bsaylor]. in the latter case (multiple binaries in a directory) you could also instantiate objects directly with a name prefix e.g. [bsaylor/partconv~]
"/usr/lib/pd/extra") when searching for paths declared with [declare -path].
gfasmdf IOhannes
PS: rather than adding a "btw", why not just start a new thread, with a new subject?
Thank you! rph-r
Le 12.05.20 à 12:47, IOhannes m zmölnig a écrit :
On 5/12/20 11:16 AM, Raphael Raccuia wrote:
well, thank you anyway... I tried matPlotLib with Python 2.7, my script doesn't work, at least as it is. So maybe it's easier to wait pd-py for Python3. If you have any idea how to bind Pd to that script, it's welcome. I'll try something simple with [shell].
By the way, I'm confused on the way to load externals, since there are not loaded after Ubuntu packages install
that's by design. installing a program doesn't automatically run it. installing an external doesn't automatically load it.
: I tried with [declare], but often it doesn't find libs, probably a path issue, since PD never searches in the right directory (seen with path verbose). It seems the path is relative to the patch, or to PD (-std...). For example with _ggee_, I had to add the absolute path in the settings. Are deb packages supposed to configure that?
no. they are supposed to just work (and generally do).
there are two issues why it doesn't work for you:
- some libraries come with a single-binary that contains multiple
objects (e.g. zexy), other libraries put one binary for each object into a directory (e.g. bsaylor). they need to be loaded differently. e.g. [declare -lib zexy] vs [declare -path bsaylor]. in the latter case (multiple binaries in a directory) you could also instantiate objects directly with a name prefix e.g. [bsaylor/partconv~]
- older versions of Pd would omit the standard paths (e.g.
"/usr/lib/pd/extra") when searching for paths declared with [declare -path].
gfasmdf IOhannes
PS: rather than adding a "btw", why not just start a new thread, with a new subject?
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Update:
I tried again installing with Deken, and now _flext_ is installed, it works more or less:
-All example patches are loading, sometimes with some errors, except sig- examples, which crash pd. All py_ objects load and seem to work.
-on startup when loading lib, I get this error: /ImportError: No module named _multiarray_umath/
rph-r
Le 12.05.20 à 19:58, Raphael Raccuia a écrit :
Thank you! rph-r
Le 12.05.20 à 12:47, IOhannes m zmölnig a écrit :
On 5/12/20 11:16 AM, Raphael Raccuia wrote:
well, thank you anyway... I tried matPlotLib with Python 2.7, my script doesn't work, at least as it is. So maybe it's easier to wait pd-py for Python3. If you have any idea how to bind Pd to that script, it's welcome. I'll try something simple with [shell].
By the way, I'm confused on the way to load externals, since there are not loaded after Ubuntu packages install
that's by design. installing a program doesn't automatically run it. installing an external doesn't automatically load it.
: I tried with [declare], but often it doesn't find libs, probably a path issue, since PD never searches in the right directory (seen with path verbose). It seems the path is relative to the patch, or to PD (-std...). For example with _ggee_, I had to add the absolute path in the settings. Are deb packages supposed to configure that?
no. they are supposed to just work (and generally do).
there are two issues why it doesn't work for you:
- some libraries come with a single-binary that contains multiple
objects (e.g. zexy), other libraries put one binary for each object into a directory (e.g. bsaylor). they need to be loaded differently. e.g. [declare -lib zexy] vs [declare -path bsaylor]. in the latter case (multiple binaries in a directory) you could also instantiate objects directly with a name prefix e.g. [bsaylor/partconv~]
- older versions of Pd would omit the standard paths (e.g.
"/usr/lib/pd/extra") when searching for paths declared with [declare -path].
gfasmdf IOhannes
PS: rather than adding a "btw", why not just start a new thread, with a new subject?
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Hey IOhannes, sorry for stumpling in here. If it is not okay, I will open a new thread. I have a question regarding your statement '[declare -path XY]'. I have trouble loading the mrpeach-library on startup and mrpeach comes with multiple binaries (at least here on my mac, downloaded from deken). I tried "-path /path/To/MrPeach" in the command line preferences and I also specified the path to mrpeach in the search path preferences. When I have both of the latter, in a new patch I can create e.g. [midifile] and it works. But when I add a "-lib mrpeach" in the command line preferences, I always get "mrpeach: can't load library" on startup. But I can still create objects from it. I mean, I can use the objects, but I don't get an overall init-message on startup, which makes me think that someting is not set correctly. Also, pd seems not to be able to find the help files for mrpeach-objects. Right-clicking [midifile] and selecting "help" gives "sorry, couldn't find help patch for "midifile-help.pd"" in the console.
Do you have an idea what I could try to do? Thank you, Jakob
PS. Your user name is the best! :-D
Gesendet: Dienstag, 12. Mai 2020 um 12:47 Uhr Von: "IOhannes m zmölnig" zmoelnig@iem.at An: pd-list@lists.iem.at Betreff: [PD] loading externals on Debian (was Re: Py/pyext not recognized...) On 5/12/20 11:16 AM, Raphael Raccuia wrote:
well, thank you anyway... I tried matPlotLib with Python 2.7, my script doesn't work, at least as it is. So maybe it's easier to wait pd-py for Python3. If you have any idea how to bind Pd to that script, it's welcome. I'll try something simple with [shell].
By the way, I'm confused on the way to load externals, since there are not loaded after Ubuntu packages install
that's by design. installing a program doesn't automatically run it. installing an external doesn't automatically load it.
: I tried with [declare], but often it doesn't find libs, probably a path issue, since PD never searches in the right directory (seen with path verbose). It seems the path is relative to the patch, or to PD (-std...). For example with _ggee_, I had to add the absolute path in the settings. Are deb packages supposed to configure that?
no. they are supposed to just work (and generally do).
there are two issues why it doesn't work for you:
objects (e.g. zexy), other libraries put one binary for each object into a directory (e.g. bsaylor). they need to be loaded differently. e.g. [declare -lib zexy] vs [declare -path bsaylor]. in the latter case (multiple binaries in a directory) you could also instantiate objects directly with a name prefix e.g. [bsaylor/partconv~]
"/usr/lib/pd/extra") when searching for paths declared with [declare -path].
gfasmdf IOhannes
PS: rather than adding a "btw", why not just start a new thread, with a new subject?
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Hi Jakob
I'm not IOhannes, but I'll answer anyway.
On Mon, 2020-05-18 at 22:22 +0200, Jakob Laue wrote:
But when I add a "-lib mrpeach" in the command line preferences, I always get "mrpeach: can't load library"
Yes, because the mrpeach library doesn't contain a binary named mrpeach. In case of mrpeach, it is sufficient to just add the path. Preferably, you add the path with [declare -path mrpeach] in your patch, rather than in the Pd configuration. This makes your patch more portable.
on startup. But I can still create objects from it. I mean, I can use the objects, but I don't get an overall init-message on startup, which makes me think that someting is not set correctly.
You don't see a message, because no external is loaded at start up (only the path is added). This is unlike the zexy library, which comes with a zexy binary and which prints something to the console when loaded. However, from what I understand, if a specific external prints a message at load time is purely optional. So that is not necessarily an indicator.
Also, pd seems not to be able to find the help files for mrpeach- objects. Right-clicking [midifile] and selecting "help" gives "sorry, couldn't find help patch for "midifile-help.pd"" in the console.
Do you have an idea what I could try to do?
I get the same, and I don't yet understand why it doesn't show, although a midifile-help.pd file is there.
Roman
I get the same, and I don't yet understand why it doesn't show, although a midifile-help.pd file is there.
It's because [midifile] sets "midifile-help" as the help symbol instead of just "midifile", so Pd looks for "midifile-help-help.pd".
https://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/mrpeach/mi...
Apparantly, this has been fixed in Purr Data, btw.
Christof
On 18.05.2020 23:06, Roman Haefeli wrote:
Hi Jakob
I'm not IOhannes, but I'll answer anyway.
On Mon, 2020-05-18 at 22:22 +0200, Jakob Laue wrote:
But when I add a "-lib mrpeach" in the command line preferences, I always get "mrpeach: can't load library"
Yes, because the mrpeach library doesn't contain a binary named mrpeach. In case of mrpeach, it is sufficient to just add the path. Preferably, you add the path with [declare -path mrpeach] in your patch, rather than in the Pd configuration. This makes your patch more portable.
on startup. But I can still create objects from it. I mean, I can use the objects, but I don't get an overall init-message on startup, which makes me think that someting is not set correctly.
You don't see a message, because no external is loaded at start up (only the path is added). This is unlike the zexy library, which comes with a zexy binary and which prints something to the console when loaded. However, from what I understand, if a specific external prints a message at load time is purely optional. So that is not necessarily an indicator.
Also, pd seems not to be able to find the help files for mrpeach- objects. Right-clicking [midifile] and selecting "help" gives "sorry, couldn't find help patch for "midifile-help.pd"" in the console.
Do you have an idea what I could try to do?
I get the same, and I don't yet understand why it doesn't show, although a midifile-help.pd file is there.
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On Mon, May 18, 2020 at 6:17 PM Christof Ressi info@christofressi.com wrote:
I get the same, and I don't yet understand why it doesn't show, although a midifile-help.pd file is there.
It's because [midifile] sets "midifile-help" as the help symbol instead of just "midifile", so Pd looks for "midifile-help-help.pd".
https://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/mrpeach/mi...
There are a few variations of the use of class_sethelpsymbol in https://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals. Some of them use the '-help' extension, others also add '.pd', most don't have any extension. If class_sethelpsymbol should only be used if the help file is named something other than classname-help.pd, I'll just remove that line. I see it's also used incorrectly in udpsend~c.
Martin