Error when Running Python Code

#58
by SyntaxError101 - opened

Traceback (most recent call last):
File "c:\Users\praty\OneDrive\Desktop\gemmatest.py", line 1, in
from transformers import AutoTokenizer, AutoModelForCausalLM
File "C:\Users\praty\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\transformers_init_.py", line 26, in
from . import dependency_versions_check
File "C:\Users\praty\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\transformers\dependency_versions_check.py", line 16, in
from .utils.versions import require_version, require_version_core
ModuleNotFoundError: No module named 'transformers.utils'

Have you installed transformers using the command pip install transformers? It could be you are missing the package.

Google org

Other folks mention that updating the transformers package version helps, can you try that too?

Thanks It Works Now!

SyntaxError101 changed discussion status to closed

Sign up or log in to comment