Closed wangvation closed 11 months ago
My code works fine in Colab AI
python 3.8 is not full supported
python 3.8 is not full supported switch to python 3.10 still exists!
switch to python 3.10, install google.generativeai with pip and this issue was solved.
now, what to do if you can't upgrade to above python 3.8?
Description of the bug:
I'm encountering an error when trying to use the google.generativeai library in my Python script.
I downloaded the generative-ai-python source code from https://github.com/google/generative-ai-python/archive/refs/tags/v0.3.1.tar.gz. Then I ran the command "python setup.py install" in my python3.8.10 virtual env.
Actual vs expected behavior:
Actual behaviour
When I run the script, I get the following error message:
Expected behaviour
The script should run without errors and generate translations for the provided prompts.
Any other information you'd like to share?
OS: Ubuntu 20.04 Env: virtualenv, Python:3.8.10 Package: Name: google-generativeai Version: 0.3.1 Summary: Google Generative AI High level API client library and tools. Home-page: https://github.com/google/generative-ai-python Author: Google LLC Author-email: googleapis-packages@google.com License: Apache 2.0 Location: /data/env/gemini/lib/python3.8/site-packages/google_generativeai-0.3.1-py3.8.egg Requires: google-ai-generativelanguage, google-api-core, google-auth, protobuf, tqdm