Skip to content

OS X: tensorflow java image not found #13872

Closed

Description

i am running with Mac OS

<dependencies>
		<dependency>
			<groupId>org.tensorflow</groupId>
			<artifactId>tensorflow</artifactId>
			<version>1.4.0-rc0</version>
		</dependency>
	</dependencies>

please note the issue is seen in 1.4.0-rc0 and 1.3.0, however the example works fine with 1.3.0-rc0

org.tensorflow.NativeLibrary: tryLoadLibraryFailed: no tensorflow_jni in java.library.path
org.tensorflow.NativeLibrary: jniResourceName: org/tensorflow/native/darwin-x86_64/libtensorflow_jni.dylib
org.tensorflow.NativeLibrary: frameworkResourceName: org/tensorflow/native/darwin-x86_64/libtensorflow_framework.dylib
org.tensorflow.NativeLibrary: org/tensorflow/native/darwin-x86_64/libtensorflow_framework.dylib not found. This is fine assuming org/tensorflow/native/darwin-x86_64/libtensorflow_jni.dylib is not built to depend on it.
org.tensorflow.NativeLibrary: extracting native library to: /var/folders/bj/v1l790113yn16zvhljd6yl8h0000gn/T/tensorflow_native_libraries-1508538938374-0/libtensorflow_jni.dylib
org.tensorflow.NativeLibrary: copied 90774332 bytes to /var/folders/bj/v1l790113yn16zvhljd6yl8h0000gn/T/tensorflow_native_libraries-1508538938374-0/libtensorflow_jni.dylib
Exception in thread "main" java.lang.UnsatisfiedLinkError: /private/var/folders/bj/v1l790113yn16zvhljd6yl8h0000gn/T/tensorflow_native_libraries-1508538938374-0/libtensorflow_jni.dylib: dlopen(/private/var/folders/bj/v1l790113yn16zvhljd6yl8h0000gn/T/tensorflow_native_libraries-1508538938374-0/libtensorflow_jni.dylib, 1): Library not loaded: @rpath/libtensorflow_framework.so
  Referenced from: /private/var/folders/bj/v1l790113yn16zvhljd6yl8h0000gn/T/tensorflow_native_libraries-1508538938374-0/libtensorflow_jni.dylib
  Reason: image not found
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1822)
	at java.lang.Runtime.load0(Runtime.java:809)
	at java.lang.System.load(System.java:1086)
	at org.tensorflow.NativeLibrary.load(NativeLibrary.java:96)
	at org.tensorflow.TensorFlow.init(TensorFlow.java:66)
	at org.tensorflow.TensorFlow.<clinit>(TensorFlow.java:70)
	at org.tensorflow.Graph.<clinit>(Graph.java:258)
	at xTensorflow.HelloTF.main(HelloTF.java:13)

Activity

  1. asimshankar commented on Oct 21, 2017

    @asimshankar
    Contributor

    Thanks for a report, there seems to be an issue with 1.4.0-rc0 and Mac OS X.
    However the point release 1.3.0 should be fine.

    The snippet you provided seems to be on the usage of 1.4.0-rc0. Could you provide the same log for when you're using 1.3.0?

  2. changed the title [-]tensorflow java image not found[/-] [+]OS X: tensorflow java image not found[/+] on Oct 21, 2017
  3. added
    stat:awaiting response
    on Oct 21, 2017
  4. self-assigned this
    on Oct 21, 2017
  5. mclodaa commented on Oct 23, 2017

    @mclodaa

    I ran into the same problem in 1.4.0-rc0 and 1.4.0-rc1. But it works well in 1.3.0
    It's import to me for supporting string tensor with Java in version 1.4.0

  6. asimshankar commented on Oct 23, 2017

    @asimshankar
    Contributor

    Yup, we will have this fixed in 1.4.0-rc1 (if there is one) and surely in the 1.4.0 release.
    (For the record, things should be fine for Linux and Windows. If the problem appears in anything other than 1.4.0-rc0 on OS X, please let us know)

  7. removed
    stat:awaiting response
    on Oct 23, 2017
  8. asimshankar commented on Oct 23, 2017

    @asimshankar
    Contributor

    1.4.0-rc1 was just published and should have the problem fixed. Could you confirm that it works @sujitbiswas @mclodaa ?

  9. added
    stat:awaiting response
    on Oct 23, 2017
  10. mclodaa commented on Oct 24, 2017

    @mclodaa

    @asimshankar it works well in 1.4.0-rc1. Thx!
    I wonder what causes this problem. I tried to solve this problem, but failed.

  11. removed
    stat:awaiting response
    on Oct 24, 2017
  12. asimshankar commented on Nov 7, 2017

    @asimshankar
    Contributor

    This should be resolved with 1.4.0 and 1.4.0-rc1. Please feel free to reopen if that is not the case.

    @sujitbiswas : I've noticed that mvnrepository.com takes a while to update sometimes. Maven Central would be more accurate.

  13. beamaster commented on Aug 27, 2019

    @beamaster
    org.tensorflow tensorflow 1.13-1

    I use the version1.13.1, then this problem appeared too.

  14. added 3 commits that reference this issue on Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions