Error in compiling python code google generative ai library

Hi
thanks for helping me out
i was using google generative ai library in python, everything was fine
after a while i needed to reinstall python and libraries and then i ran into this error
in the procedure of running the code , i tried different versions of libraries but still
getting this error

<< TypeError: Couldn’t build proto file into descriptor pool: duplicate symbol ‘google.ai.generativelanguage.v1beta.firstlineno’>>

i tried even reinstalling python, clearing pip cache and … still persists
ill be thankful if you could help me out

ps : the code is fine and bug free, it runs on other systems well

2 Likes

Hi @BlueSky

Could you let me know which version of Python you’re currently using? If it’s 3.13, consider downgrading or rolling back to Python 3.12.x

Thanks

1 Like

hey thanks for your reply
i downgraded my python to version " 3.11.9 " and the error disappeared
it was strange though because the error was related to compiler issue
and i thought maybe this recent library release is buggy but it turns out
that it was not compatible with recent python release

thanks again for your help :pray:

1 Like