pmh47 / dirt

DIRT: a fast differentiable renderer for TensorFlow
MIT License
312 stars 63 forks source link

Installation errors: Tensorflow-protobuf incompatibility with tensor flow v2.13.0 #114

Open aquatic282 opened 1 year ago

aquatic282 commented 1 year ago

Hello all,

I tried to install the DIRT renderer using a variant of the described docker approach since the original DockerFile didn't work for me. I'm using the following libraries:

MicrosoftTeams-image

Using this setup, I get exceptions during the pip install . command:

MicrosoftTeams-image (1)

I believe this error is related to a mismatch between tensor flow 2.13.0 and protobuf 4.24.0. Did anyone recently succeeded to install the Dirt renderer using the described docker approach, or knows how this dependency mismatch can be fixed? As I wrote before, installing all libraries using the same version numbers are specified in the provided DockerFile didn't work for me.

MilesTheProwler commented 1 year ago

As far as I know, we can solve the tensorflow mismatch by using pip install -e . --no-deps. I can install dirt successfully but when I import dirt I got errors.

aquatic282 commented 1 year ago

@NaToh5 Thank you for your fast reply. I'll give this a try. What kind of errors do you get when you import dirt?

MilesTheProwler commented 1 year ago

I am still finding a way to solve these errors . Look like this repo is really old and no longer supported by developer.

I got this error when I import dirt. I run on both linux and window, still have same errors.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\ADMIN\Desktop\Project\dirt\dirt\__init__.py", line 2, in <module>
    from .rasterise_ops import rasterise, rasterise_batch, rasterise_deferred, rasterise_batch_deferred
  File "C:\Users\ADMIN\Desktop\Project\dirt\dirt\rasterise_ops.py", line 6, in <module>
    _rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so')
  File "C:\Users\ADMIN\anaconda3\envs\Octopus\lib\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: C:\Users\ADMIN\Desktop\Project\dirt\dirt\librasterise.so not found

I install only with pip install -e . --no-deps and didn't use Cmake installation. image

aquatic282 commented 1 year ago

Your error message says that the librasterise.so library cannot be found. I assume "C:\Users\ADMIN\Desktop\Project\dirt\dirt\" is a folder on your local computer? Check if the library exists under this folder, and do a search for this library to check if it has been installed anywhere else.

It seems ibrasterise.so should be installed together with tensor flow, and the following part of the code that tries to load this library assumes that it exists at a specific location:

image

Your problem sounds very similar to this issue: https://github.com/pmh47/dirt/issues/75

MilesTheProwler commented 1 year ago

I am not sure how can I find that librasterize.so ? Did you already try to install and got same errors like mine? After changing the tensorflow-gpu==1.15.0, I got new error.

2023-08-18 15:37:45.789322: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
WARNING: failed to load librasterise.so; rasterisation functions will be unavailable:
 C:\Users\ADMIN\Desktop\Project\dirt\dirt\librasterise.so not found

I have this under dirt/dirt image

aquatic282 commented 1 year ago

I am not sure how can I find that librasterize.so ? Did you already try to install and got same errors like mine?

I have this under dirt/dirt image

No, I didn't try yet. I will try later today and let you know.

Yes, you just have the .py files in this directory, but no .so file. Try to find the library with "find / -type f -name librasterise.so".

MilesTheProwler commented 1 year ago

Thank you for helping me. Do you have any social media accounts (Wechat? ) We can discuss more on there.

aquatic282 commented 1 year ago

Thank you for helping me. Do you have any social media accounts (Wechat? ) We can discuss more on there.

You're welcome. I don't have WeChat, but I'm happy to further discuss this issue.

MilesTheProwler commented 1 year ago

I already search that file , there is no librasterise.so file on my PC. I am not sure what should I do next. You can share with me any social media app that you are comfortable with.

aquatic282 commented 1 year ago

Let me think about the social media platform…

There is another issue that seems related: https://github.com/pmh47/dirt/issues/100

It seems that you had installation errors so that the .so library didn’t get installed. Apparently it can be solved by downgrading cmake.

On Fri, 18 Aug 2023 at 11:14, NaToh5 @.***> wrote:

I already search that file , there is no librasterise.so file on my PC. I am not sure what should I do next. You can share with me any social media app that you are comfortable with.

— Reply to this email directly, view it on GitHub https://github.com/pmh47/dirt/issues/114#issuecomment-1683612183, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYXEV4AM26XPUPC4G4JLS3XV4W6RANCNFSM6AAAAAA3UQVWGA . You are receiving this because you authored the thread.Message ID: @.***>

MilesTheProwler commented 1 year ago

Ok, I will try it. In case you can install it and run successfully. Please let me know.

pmh47 commented 1 year ago

Please read the README, which says Linux is required. This repo does not support Windows. librasterise.so would, on Linux, be built automatically during the installation.

MilesTheProwler commented 1 year ago

@pmh47 thank you for your reply. But I already try on my Linux PC, still have same error. I already try pip install -e . --no-deps and install successfully, but when I import dirt I got same error like window.

So I am trying to install with Cmake again on Linux, I can runcmake ../csrc successfully, however when I run make, I got many errors, so I cannot install with cmake process for now on my Linux. I already send you email, I hope you reply me from there too.

This error is coming from run make

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
make[2]: *** [CMakeFiles/rasterise.dir/build.make:90: CMakeFiles/rasterise.dir/rasterise_egl.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/rasterise.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
[full_log.txt](https://github.com/pmh47/dirt/files/12344576/full_log.txt)

Please help me to solve my issue.

pmh47 commented 1 year ago

This parameter packs not expanded error is a gcc/nvcc bug, not a problem in DIRT itself; using g++ 10 should fix it; see e.g. https://github.com/NVlabs/instant-ngp/issues/119

MilesTheProwler commented 1 year ago

@pmh47 I can solve the error and run successfully after I install it on Unbuntu 20 .Thanks for helping !

MilesTheProwler commented 1 year ago

@aquatic282 did you solve it ? @pmh47 I have an error when I run the python test/test.py I got this error 2020-04-16 11:39:05.592220: F /home/frank/Documents/dirt/csrc/gl_common.h:46] extensions eglQueryDevicesEXT, eglQueryDeviceAttribEXT and eglGetPlatformDisplayEXT not available

manuelbirlo commented 5 months ago

I stopped my attempt to install the DIRT renderer and continued working on another project. Now I'm trying to install it again but don't seem to find a suitable Docker container configuration that works for me.