Open cirosantilli opened 6 months ago
same issue here
Did you find any solution?
Edit : works with python 3.6 and tensorflow==2.2.0
Edit : works with python 3.6 and tensorflow==2.2.0
Ah nice! Maintainers made the fatal mistake of using >=
on requirements.txt
: https://github.com/GantMan/nsfw_model/blob/699b6796a55604341fbfdffe2b27ced1d868c591/requirements.txt#L1
That's annoying, on Python 3.11.6 I get:
$ pip install tensorflow==2.2.0
ERROR: Could not find a version that satisfies the requirement tensorflow==2.2.0 (from versions: 2.12.0rc0, 2.12.0rc1, 2.12.0, 2.12.1, 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0, 2.15.0.post1, 2.15.1, 2.16.0rc0, 2.16.1)
ERROR: No matching distribution found for tensorflow==2.2.0
so you really have to go down the Python version... and pyenv install 3.6.0
segfaults...
my solution
pip install tf-keras==2.16.0 tensorflow-hub==0.16.0
Tensorflow has some change about keras. (keras 2 -> keras3)
There is migration issue.
Clone repo at 699b6796a55604341fbfdffe2b27ced1d868c591 then try to run on a clean virtualenv:
tmp.py
blows up with:
Ubuntu 23.10, Python 3.11.6.
pip freeze
contains: