The file /Users/brian/j64-807/bin/libj.so is for linux. For osx you need: /Users/brian/j64-807/bin/libj.dylib
You could try finding where that is set in the addon and editing as appropriate. On Fri, Jul 2, 2021 at 11:37 AM Brian Schott <[email protected]> wrote: > Piggybacking, I could not get an even more basic python3 version to work. > It looks like the file j64-807/bin/libj.so is missing. > I am using OSX. > Below is my session. > Thank you, in advance, > > server:~ brian$ python3 > Python 3.7.7 (v3.7.7:d7c567b08f, Mar 10 2020, 02:56:16) > [Clang 6.0 (clang-600.0.57)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> sys.path.append('/Users/brian/j64-807/addons/api/python3') > >>> import jbase as jbase > >>> jbase.init(True) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/Users/brian/j64-807/addons/api/python3/jcore.py", line 18, in init > libj= CDLL(pathdll) > File > > "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/__init__.py", > line 364, in __init__ > self._handle = _dlopen(self._name, mode) > OSError: dlopen(/Users/brian/j64-807/bin/libj.so, 6): image not found > > > On Fri, Jul 2, 2021 at 3:45 AM Raoul Schorer <[email protected]> > wrote: > > > Hi, > > > > I'm attempting to use J in VisiData <https://github.com/saulpw/visidata > >. > > When testing api/python3 with this program: > > > > import sys > > sys.path.append('/home/raoul/Desktop/j903/addons/api/python3') > > import jbase as jb > > import numpy as np > > > > jb.init(True) > > > > def j_mean(vals): > > jb.set('temp', np.array(vals)) > > e = jb.do('var=:(+/%#)temp') > > r = jb.get('var') > > return (r,e) > > > > print(j_mean(list([1,2,3,4]))) > > > > Everything works as expected. But when trying to call 'j_mean' from > > VisiData: > > > > e = jb.do('var=:(+/%#)temp') yields error code 17 (file exists) > > > > My understanding is that 'jbase.set' serializes its numpy array argument > to > > a file, and the problem is that this file is perhaps left lying around > when > > it shouldn't. > > I know this is a rather vague question, but does anybody have an idea on > > how to fix this? Or is the problem likely on the VisiData side? > > > > Thanks! > > Raoul > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > -- > (B=) <-----my sig > Brian Schott > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
