Closed ghost closed 1 year ago
Hi! Thanks for your message.
I cannot reproduce your issue. Could you show me what you have done and post the full error message here?
First of all I installed Python 3.11.6
After that I openend a terminal and created a new virtual environment with "python -m venv test" and activated that virtual environment
Then I run the command "pip install opennsfw2 mysql-connector-python"
I tried to run my python script, but I got this error:
(metadata) PS C:\Users\Gabriel\PycharmProjects\Image-Filter\nsfw-score-and-model-filter> python .\metadata-extraction.py
Traceback (most recent call last):
File "C:\Users\Gabriel\PycharmProjects\Image-Filter\nsfw-score-and-model-filter\metadata-extraction.py", line 242, in
from keras_core.src.activations.activations import elu
File "C:\Users\Gabriel\PycharmProjects\Image-Filter\metadata\Lib\site-packages\keras_core\src\activations\activations.py", line 1, in
from keras_core.src import backend
File "C:\Users\Gabriel\PycharmProjects\Image-Filter\metadata\Lib\site-packages\keras_core\src\backend\
I somehow made it work on another pc (linux with python 3.9) by additionally installing tensorflow
Thanks for the error message and your update!
Yes, from this line:
from keras_core import layers, KerasTensor, Model # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
we can see that the problem came from importing Keras, which would also import TensorFlow if you are using TensorFlow backend.
I have Googled a bit and it seems that DDL load failed
has been a common issue for using TensorFlow in Windows, and it's related to the version mismatch, but I don't know much about that as well.
This time, I guess the issue probably came from Python 3.11, as you have tested. I'm glad that you have found a workaround.
There is no "fix" on our side, so hopefully in some future versions TensorFlow/Keras will solve it (again).
It says no module named 'tree' when trying to install or run opennsfw2