I get the following error: In [6]: jbase.init(True) --------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-6-b2dd96bc102b> in <module> ----> 1 jbase.init(True)
~/code/J/j903/addons/api/python3/jcore.py in init(loadprofile) 16 if jt!=0: 17 raise AssertionError('J: init already run') ---> 18 libj= CDLL(pathdll) 19 libj.JInit.restype = c_void_p 20 libj.JGetR.restype = c_char_p ~/anaconda3/lib/python3.8/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error, winmode) 371 372 if handle is None: --> 373 self._handle = _dlopen(self._name, mode) 374 else: 375 self._handle = handle OSError: /home/eric/j64-806/bin/libj.so: cannot open shared object file: No such file or directory On Fri, Jul 2, 2021 at 11:40 AM Eric Iverson <eric.b.iver...@gmail.com> wrote: > 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 <schott.br...@gmail.com> > 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 <raoul.scho...@gmail.com> > > 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 > -- Vijay Lulla, PhD ORCID | <https://orcid.org/0000-0002-0823-2522> Homepage <http://vlulla.github.io> | Google Scholar <https://scholar.google.com/citations?user=VjhJWOgAAAAJ&hl=en> | Github <https://github.com/vlulla> ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm