Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while using tensorflow 1.15. #70

Open
OOF-dura opened this issue May 6, 2020 · 7 comments
Open

Error while using tensorflow 1.15. #70

OOF-dura opened this issue May 6, 2020 · 7 comments

Comments

@OOF-dura
Copy link

OOF-dura commented May 6, 2020

System information

  • Linux Ubuntu 16.04
  • TensorFlow version: 1.15.0
  • Python version: py3.6
  • Installed using virtualenv? pip? conda?: pip
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version: Driver Version: 410.78 CUDA Version: 10.0
  • GPU model and memory: NVIDIA 2080 8G

I switch the tf version from 1.13 to 1.15.
When I run the code, I got the following errors.

_rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so')

Errors:

  File "/home/frank/Desktop/mesh-py3/my_venv/lib/python3.5/site-packages/dirt/rasterise_ops.py", line 6, in <module>
    _rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so')
  File "/home/frank/Desktop/mesh-py3/my_venv/lib/python3.5/site-packages/tensorflow_core/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

Should I reinstall the dirt? or just make some settings can fix this problem?

Best regards, thanks!

@pmh47
Copy link
Owner

pmh47 commented May 6, 2020

Yes, you should reinstall / rebuild DIRT. Tensorflow changes this library from version to version, and DIRT needs to be built with the right one.

@OOF-dura OOF-dura changed the title Error while using tensorflpw 1.15. Error while using tensorflow 1.15. May 6, 2020
@OOF-dura
Copy link
Author

OOF-dura commented May 6, 2020

Yes, you should reinstall / rebuild DIRT. Tensorflow changes this library from version to version, and DIRT needs to be built with the right one.

Hi~
I rebuild and reinstall via:

source venv/bin/activate
cd dirt
rm -r build
mkdir build
cd build
cmake -D_OPENGL_LIB_PATH=/usr/lib/nvidia-410 ../csrc
make -j12
cd ..
pip install -e .

My python is 3.5.

Then I ran

python tests/square_test.py

I still get:

/home/frank/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/frank/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/frank/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:528: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/frank/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:529: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/frank/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:530: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/frank/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:535: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
  File "tests/square_test.py", line 4, in <module>
    import dirt
  File "/home/frank/Documents/dirt/dirt/__init__.py", line 2, in <module>
    from .rasterise_ops import rasterise, rasterise_batch, rasterise_deferred, rasterise_batch_deferred
  File "/home/frank/Documents/dirt/dirt/rasterise_ops.py", line 6, in <module>
    _rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so')
  File "/home/frank/.local/lib/python3.5/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.1: cannot open shared object file: No such file or directory

@Frank-Dz
Copy link

Frank-Dz commented May 6, 2020

Hi~ I met a similar problem that is when I run the code in terminal in Pycharm, it works well for me but when I run the code in the GUI of Pycharm, I got:

processing... data index:  2 , pose index:  0 , rotation index:  0
/media/frank/Elements1/data/Train_data/arbitrary_01/combination3/2/pose0/imgs/V1.txt
/media/frank/Elements1/data/Train_data/arbitrary_01/combination3/2/pose0/imgs/V1.txt
2020-05-06 22:25:04.673730: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-05-06 22:25:05.022392: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-05-06 22:25:05.025248: F /home/frank/Documents/dirt/csrc/gl_common.h:46] extensions eglQueryDevicesEXT, eglQueryDeviceAttribEXT and eglGetPlatformDisplayEXT not available

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

My env is python 3.7 in conda with TF 1.15.0.

@pmh47
Copy link
Owner

pmh47 commented May 6, 2020

The problem with pycharm is likely that an environment variable is set in the terminal, but not in the pycharm run configuration. It's therefore finding a different version of libEGL. Do export in the terminal to see what LD_LIBRARY_PATH, LD_PRELOAD, etc. are set to, and then set them similarly in the pycharm run configuration environment variables.

The other problem, with tf 1.15, is strange; I think you somehow built DIRT in the venv with tf 1.15, but then ran in another python install with tf 1.13.

@divyaYK
Copy link

divyaYK commented Jun 18, 2021

Hi, @pmh47 !
Could you please tell me how to install dirt with tensorflow 1.15? Everytime I run pip install -e . after building, pip is automatically trying to install tensorflow 2.5.0

@pmh47
Copy link
Owner

pmh47 commented Jun 20, 2021

@divyaYK Try adding --no-deps to pip command

@divyaYK
Copy link

divyaYK commented Jun 22, 2021

Thank you @pmh47, that worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants