scalapy-test:>python3-config --ldflags
-L/Users/brandons/.pyenv/versions/3.8.5/lib/python3.8/config-3.8-darwin -lintl -ldl -framework CoreFoundation
sbt:scalapy-test> run
[info] running (fork) Main
[error] Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'python3':
[error] dlopen(libpython3.dylib, 9): image not found
[error] dlopen(libpython3.dylib, 9): image not found
[error] Native library (darwin/libpython3.dylib) not found in resource path (TOO LONG)
[error] at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:302)
[error] at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:455)
[error] at com.sun.jna.Native.register(Native.java:1722)
[error] at com.sun.jna.Native.register(Native.java:1443)
[error] at me.shadaj.scalapy.interpreter.CPythonAPIInterface.$anonfun$new$2(CPythonAPI.scala:13)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[error] at scala.util.Try$.apply(Try.scala:210)
[error] at me.shadaj.scalapy.interpreter.CPythonAPIInterface.$anonfun$new$1(CPythonAPI.scala:13)
[error] at me.shadaj.scalapy.interpreter.CPythonAPIInterface.$anonfun$new$1$adapted(CPythonAPI.scala:13)
[error] at scala.collection.immutable.List.find(List.scala:413)
[error] at me.shadaj.scalapy.interpreter.CPythonAPIInterface.<init>(CPythonAPI.scala:13)
[error] at me.shadaj.scalapy.interpreter.CPythonAPI$.<init>(CPythonAPI.scala:95)
[error] at me.shadaj.scalapy.interpreter.CPythonAPI$.<clinit>(CPythonAPI.scala:95)
[error] at me.shadaj.scalapy.interpreter.CPythonInterpreter$.<clinit>(CPythonInterpreter.scala:9)
[error] at me.shadaj.scalapy.py.package$.<clinit>(package.scala:15)
[error] at Main$.main(Main.scala:13)
[error] at Main.main(Main.scala)
[error] Suppressed: java.lang.UnsatisfiedLinkError: dlopen(libpython3.dylib, 9): image not found
[error] at com.sun.jna.Native.open(Native Method)
[error] at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:191)
[error] ... 16 more
[error] Suppressed: java.lang.UnsatisfiedLinkError: dlopen(libpython3.dylib, 9): image not found
[error] at com.sun.jna.Native.open(Native Method)
[error] at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:204)
[error] ... 16 more
[error] Suppressed: java.io.IOException: Native library (darwin/libpython3.dylib) not found in resource path (TOO LONG)
[error] at com.sun.jna.Native.extractFromResourcePath(Native.java:1095)
[error] at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:276)
[error] ... 16 more
[error] Nonzero exit code returned from runner: 1
[error] (Compile / run) Nonzero exit code returned from runner: 1
[error] Total time: 1 s, completed Nov 24, 2020 2:04:42 PM
sbt:scalapy-test>
ThisBuild / scalaVersion := "2.13.3"
libraryDependencies += "me.shadaj" %% "scalapy-core" % "0.4.0"
fork := true
import scala.sys.process._
javaOptions += s"-Djava.library.path=${"python3-config --ldflags".!! + "/lib"}"
-Djna.library.path=/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib
which is effectively -Djna.library.path=${"python3-config --prefix".!!.trim}/lib
SCALAPY_PYTHON_LIBRARY = python3.8
SCALAPY_PYTHON_LIBRARY=python3.6m
(replacing 3.6 with the appropriate Python version) to fix it for now
Hello all, the folowing snippet fails to compile:
import me.shadaj.scalapy.numpy.NumPy
import me.shadaj.scalapy.py
val np = py.module("numpy").as[NumPy]
could not find implicit value for evidence parameter of type me.shadaj.scalapy.readwrite.Reader[me.shadaj.scalapy.numpy.NumPy]
val np = py.module("numpy").as[NumPy]
Any hints?
py.module("numpy")
compiles despite missing implicit jep: Jep
, whereas implicitly[Jep]
fails to compile.