I am trying to include TensorFlow in my Scala project using this build on MacOS.
As for the installation they provide two ways of doing so:
1) Include the following line to the SBT build:
libraryDependencies += "org.platanios" % "tensorflow" % "0.4.0" classifier "darwin-cpu-x86_64"
However this does not build and gives the following error:
unresolved dependency: org.platanios#tensorflow;0.4.0: not found
2) Build TensorFlow from scratch (which I did via the following steps):
clone the tensorflow git repository
checkout branch r1.12
run ./configure
build using bazel and the following command: bazel build --config=opt --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0 //tensorflow:libtensorflow.so
add libtensorflow.so in a directory that is in LD_LIBRARY_PATH
install protobuf using brew
However, still no success when I want to import tensorflow in my project.
Any ideas on how to fix this?
我认为您只需要指定scala版本(希望是2.12),所以放置tensorflow_2.12而不是仅tensorflow
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.