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

ModuleNotFoundError: No module named 'tensorflow.keras' #130

Open
xiekunwhy opened this issue Jun 7, 2024 · 2 comments
Open

ModuleNotFoundError: No module named 'tensorflow.keras' #130

xiekunwhy opened this issue Jun 7, 2024 · 2 comments

Comments

@xiekunwhy
Copy link

Hi,

I install helixer following https://github.com/weberlab-hhu/Helixer/blob/72bcb2331525f9e951a6d155b7ce67c07f8e4ca0/docs/dev_install.md, after everything was done, I got following error when I trying to run Helixer.py. Do you known how to fixed this error?

Helixer.py -h
/public2/home/sl_qybio/sl_qybio/miniforge3/envs/helixer/bin/Helixer.py:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').require('helixer==0.3.1')
2024-06-07 16:47:36.280351: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-06-07 16:47:36.321215: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE4.1 SSE4.2 AVX AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/envs/helixer/bin/Helixer.py", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/Helixer/Helixer.py", line 14, in <module>
    from helixer.prediction.HybridModel import HybridModel
  File "/public2/home/sl_qybio/sl_qybio/miniforge3/Helixer/helixer/prediction/HybridModel.py", line 4, in <module>
    from tensorflow.keras.models import Model
ModuleNotFoundError: No module named 'tensorflow.keras'

Best,
Kun

@xiekunwhy
Copy link
Author

down tensorflow to 2.15.0 solved this problem.

@alisandra
Copy link
Collaborator

glad to here it.

That said, I can only recommend the simplicity of running via apptainer (providing Helixer and HelixerPost both; and already available on most hpc systems).

Nevertheless if install is necessary:
https://apptainer.org/docs/admin/main/installation.html

Then run as follows (except replacing 'singularity' with 'apptainer'): https://github.com/gglyptodon/helixer-docker?tab=readme-ov-file#running-via-singularity

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

2 participants