allo-/virtual_webcam_background

Dependency problems with tensorflowjs

7wells opened this issue · 6 comments

Hello!

There are dependency problems with tensorflowjs when installing the requirements:

tensorflowjs 2.8.3 has requirement h5py<3,>=2.8.0, but you'll have h5py 3.1.0 which is incompatible.
tensorflowjs 2.8.3 has requirement tensorflow<3,>=2.1.0, but you'll have tensorflow 1.14.0 which is incompatible.

I am not sure, though, how to deal with it.

allo- commented

This looks like it is not a problem it the requirements of this project, or is it?

The project does not specifiy a tensorflow version in the requirements.txt file, but my current virtual environment uses:

tensorflow==2.2.1
tensorflowjs==2.8.1

Mostly chosen to match the installed CUDA version.

If/when I have a better understanding of gettings things up and running (maybe on another device), I will happily come back. 😊

allo- commented

I'll leave this open for now. We need to check if some dependencies are broken any may need to be pinned to versions known to work together nicely.

BTW I spent a bit of time getting GitHub Actions working nicely for my projects. It will catch those errors. In combination with Dependabot you could keep the dependencies up-to-date. Happy to help if needed.

allo- commented

My main problem with pinning down versions is that tensorflow and CUDA seem to need matching versions and CUDA also depends on the kernel driver version, so there seems to be no one size fits all approach to using the right tensorflow.

I had problems in the past with CUDA 10 vs. 10.1 and unmatched symbols in the binaries and the most useful advice was to find an old tensorflow version that works with the used driver. I wonder if they try to be compatible with more than one version in the future.
At least the python 2 vs. python 3 problems should be gone by now.

I need to do more tests with CUDA and try to write some useful documentation anyway. Pointing people to tensorflow docs isn't that user friendly.

Okay, fair enough. I didn't know about the issues with CUDA (and don't have any card to test it with).
At least with TensorFlow 2 you no longer need to install a separate GPU package.
Perhaps it will be worth to separate GPU and CPU usage. Then you could provide the CPU path that should always work, whereas GPU may be more experimental.

In any case, the initially reported error seems to be a pure pip dependency issue which could perhaps be captured via a ci build.
You are probably aware of the pip 20.3+ version that had introduced the new (more strict) resolver as the default.

Just a suggestion. I am a big fan of ci builds as you probably noticed.