PJLink icon indicating copy to clipboard operation
PJLink copied to clipboard

Cannot find WolframKernel binary for non standard installation (Fedora 28)

Open bgatessucks opened this issue 6 years ago • 0 comments

In my installation the binary is at: /opt/Wolfram/Mathematica/11.3/SystemFiles/Kernel/Binaries/Linux-x86-64/WolframKernel

ker = SubprocessKernel()

results in

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-46b7fe96b177> in <module>()
----> 1 ker = SubprocessKernel()
      2 def MEval (expr, wait = True, kernel = ker) :
      3     """MEval evaluates a Mathematica expression in the Mathematica kernel
      4 
      5     """

~/.Mathematica/Paclets/Repository/PJLink-1.0.3/SubprocessKernel/SubprocessKernel.py in __init__(self, init, debug_level)
     15 
     16     def __init__(self, init = None, debug_level = 0):
---> 17         super().__init__(NativeLink(init=init, debug_level=debug_level))
     18         self.__py_eval_link = None
     19         self.__reader = None

~/.Mathematica/Paclets/Repository/PJLink-1.0.3/PJLink/NativeLink.py in __init__(self, init, debug_level)
     35 
     36         if init is None:
---> 37             bin = self.Env.get_Kernel_binary()
     38             init = ["-linkmode", "launch", "-linkname", "'{}' -mathlink".format(bin)]#, "-mathlink", "-wstp"]
     39         elif isinstance(init, str) and os.path.isfile(init):

~/.Mathematica/Paclets/Repository/PJLink-1.0.3/PJLink/MathLinkEnvironment.py in get_Kernel_binary(cls, version)
    724 
    725         if not os.path.isfile(bin):
--> 726             raise ValueError("Couldn't find binary for platform {} ({} is not a file)".format(plat, bin))
    727 
    728         return bin

ValueError: Couldn't find binary for platform Linux (/opt/Wolfram/Mathematica/SystemFiles/Kernel/Binaries/Linux-x86-64/WolframKernel is not a file)

bgatessucks avatar Sep 29 '18 08:09 bgatessucks