-
Notifications
You must be signed in to change notification settings - Fork 45.9k
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
No module named 'tensorflow_models' on Mac M2 with TF 2.13.0 #11071
Comments
Hi @plannaAlain, Thank you for getting in touch. Regrettably, TF-Text does not currently provide support for Apple Mac computers. This is the reason behind the error you're encountering. For more comprehensive information, please consult the Readme.md. This should provide you with a clearer understanding of the cause of the error you're experiencing. Thanks. |
Hi @laxmareddyp, I managed to install Text 2.13 from sources but still getting same error:
ModuleNotFoundError: No module named 'tensorflow_models' |
Hi @plannaAlain , I'm pleased to know that you were able to successfully install TensorFlow Text version 2.13.0. However, there seems to be an issue with the compatibility between TensorFlow Text and the official TensorFlow models (tf-models-official). The requirement.txt file of tf-models-official expects a matching version of TensorFlow Text, which can lead to problems. To address this, you should install the same version of TensorFlow Text as specified in the requirement.txt of tf-models-official(2.13.0). This will likely resolve the error you encountered. Also, it's worth noting that you don't need to install TensorFlow separately when installing tf-models-official, as it should be automatically included as a dependency. Use below command for installing tf-models-official 2.13.0:
Thanks. |
This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you. |
pip install tf-models-official==2.13.0 yields: Here's my setup: |
Hi @plannaAlain, TF-Text does not currently provide support for Apple Mac computers. This is the reason behind the error you're encountering even though you managed to install TF-text. Thanks. |
This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you. |
This issue was closed due to lack of activity after being marked stale for past 7 days. |
Hi, we have created a separate pip package for TensorFlow Official Models (tf-models-no-deps 2.16.0) this won't have TensorFlow Text (TF-Text) as a dependency. This will allow users to install and use tf-models-official(for vision users) on any platform without needing TF-Text specifically. |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
1. The entire URL of the file you are using
Installed using 'pip install tf-models-official'
2. Describe the bug
I installed the latest version of tensorflow for Mac and tf-models-official (see requirements.txt below), but keep getting:
import tensorflow_models as tfm
ModuleNotFoundError: No module named 'tensorflow_models'
Code:
`import numpy as np
import tensorflow as tf
print(np.version)
print(tf.version)
import tensorflow_models as tfm
print("Top-level modules: ", dir(tfm))
print("NLP modules: ", dir(tfm.nlp))
print("Vision modules: ", dir(tfm.vision))`
3. Steps to reproduce
pip install -r requirements.txt
python test.py (see code above)
4. Expected behavior
It should find tensorflow_models
5. Additional context
tensorflow 2.13.0
tensorflow-addons 0.21.0
tensorflow-datasets 4.9.2
tensorflow-estimator 2.13.0
tensorflow-hub 0.14.0
tensorflow-macos 2.13.0
tensorflow-metadata 1.14.0
tensorflow-model-optimization 0.7.5
termcolor 2.3.0
text-unidecode 1.3
tf-models-official 2.5.1
6. System information
The text was updated successfully, but these errors were encountered: