Skip to content

libtensorflow_framework.so issue #30488

Closed

Description

@yunoJ

Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): I git cloned it from https://github.com/smallcorgi/Faster-RCNN_TF.git
  • OS Platform and Distribution: ubuntu 18.04
  • TensorFlow installed from: pip install
  • TensorFlow version: used both 1.14.0rc and 1.14.0(gpu)
  • Python version: 2.7
  • GCC/Compiler version: 7.4
  • CUDA/cuDNN version: 10.0
  • GPU model and memory: GV 100

My script file is demo.py.

Here's the back trace

Traceback (most recent call last):
  File "./tools/demo.py", line 11, in <module>
    from networks.factory import get_network
  File "/home/tFaster-RCNN_TF/tools/../lib/networks/__init__.py", line 8, in <module>
    from .VGGnet_train import VGGnet_train
  File "/home/Faster-RCNN_TF/tools/../lib/networks/VGGnet_train.py", line 2, in <module>
    from networks.network import Network
  File "/home/Faster-RCNN_TF/tools/../lib/networks/network.py", line 3, in <module>
    import roi_pooling_layer.roi_pooling_op as roi_pool_op
  File "/homeFaster-RCNN_TF/tools/../lib/roi_pooling_layer/roi_pooling_op.py", line 5, in <module>
    _roi_pooling_module = tf.load_op_library(filename)
  File "/home/.local/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 61, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: libtensorflow_framework.so: cannot open shared object file: No such file or directory

I checked that libtensorflow_framework.so is in python2.7/site-packages/tensorflow/ but somehow my program doesn't seem to be able to find it. The path for the tensorflow library is set as $TF_LIB = /home/.local/lib/python2.7/site-packages/tensorflow

I did run into some solutions but coudn't find one with tf version 1.14.0.

Please help.

Thanks in advance.

Activity

  1. PhilJd commented on Jul 8, 2019

    @PhilJd
    Contributor

    Hi @yunoJ,
    does it work if you specify the full path in library_name? Otherwise you might be able to fix this by adding the directory of your libtensorflow_framwork to your LD_LIBRARY_PATH.

  2. yunoJ commented on Jul 9, 2019

    @yunoJ
    Author

    Thank you @PhilJd,
    Appending the LD_LIBRARY_PATH worked for me. Well, for the libtensorflow_framework.so at least. I guess I should just keep adding directories for every .so file I use.

  3. self-assigned this
    on Jul 9, 2019
  4. ravikyram commented on Jul 9, 2019

    @ravikyram
    Contributor

    Please,let me know if we can close this issue since it looks to be fixed. Thanks!

  5. yunoJ commented on Jul 9, 2019

    @yunoJ
    Author

    Oh, the problem is fixed. I will close the issue, thanks!

  6. kiranintellify commented on Jul 30, 2019

    @kiranintellify

    can you specify where to append i faced the same issue with python 3.6 tensorflow

  7. PhilJd commented on Jul 30, 2019

    @PhilJd
    Contributor

    You need to run the command

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"path/to/your/libtensorflow"
    
  8. kiranintellify commented on Jul 31, 2019

    @kiranintellify

    Thanks but after trying it i amgetting error undefined symbol: _ZTVN10tensorflow14kernel_factory17OpKernelRegistrar18PtrOpKernelFactoryE

  9. isohrab commented on Oct 21, 2019

    @isohrab

    When people (like myself) come from python to java world, everything is strange! here is how I solved my problem regarding all linking errors:
    I assumed you already have simple hello Tensorflow project, explained here

    First:

    1. Download and copy tensorflow JNI files to :/usr/lib/tensorflow
    2. Download and copy desired version of tensorflow Lib jar file to: /usr/lib/tensorflow

    Compile with java

    1. Compile java file
    javac -cp /usr/lib/tensorflow/libtensorflow-1.14.0.jar HelloTensorFlow.java
    1. run java file:
    java -cp /usr/lib/tensorflow/libtensorflow-1.14.0.jar:. -Djava.library.path=/usr/lib/tensorflow/ HelloTensorFlow

    MAVEN

    1. First we should export LD_LIBRARY_PATH:
    export LD_LIBRARY_PATH=/usr/lib/tensorflow
    1. Then run maven build command:
    mvn -q compile exec:java

    I hope it helps you

  10. chanchalIITP commented on Nov 25, 2019

    @chanchalIITP

    Hi, Sorry for commenting on the closed issue. I tried to append the libtensorflow path, but again getting the same error. How can I know the correct path of libtensorflow.

  11. deepaknlp commented on Nov 25, 2019

    @deepaknlp

    @chanchalIITP , run this to get the path of your libtensorflow:
    find . -name libtensorflow_framework.so2

  12. AASHISHAG commented on Nov 28, 2019

    @AASHISHAG

    @chanchalIITP : Are you able to solve the error? I am also facing the same issue. Kindly help.

  13. chanchalIITP commented on Nov 29, 2019

    @chanchalIITP

    @AASHISHAG, find . -name libtensorflow_framework.so2 works for finding the path of .so file. In my case, actually the .so file is not generated. It generally happens if the tensorflow and gcc is not compatible.
    Concluding: I am also not able to solve it. You may check the compatibility of CUDA, Tensorflow, and gcc.

  14. pathway commented on Apr 28, 2020

    @pathway

    @chanchalIITP , run this to get the path of your libtensorflow:
    find . -name libtensorflow_framework.so2

    The above mis-spells the file name. Try:
    find . -name libtensorflow_framework.so.2

  15. sheggamharshith commented on May 4, 2020

    @sheggamharshith

    i hope the problem is with the tensorflow version so try to change the versionand reinstall the tensorflow version

  16. hhhhsmx commented on May 16, 2022

    @hhhhsmx

    You need to run the command

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"path/to/your/libtensorflow"
    

    Hello, what is the situation after I change the path and enter this command does not respond?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions