user-1
(User 1)
December 27, 2024, 8:22pm
1
This topic was automatically generated from Slack. You can find the original thread here .
In a Python code step, I tried import google.generativeai as genai
and was told there’s no module named there. ive confirmed it on pypi, google-generativeai · PyPI
user-1
(User 1)
December 27, 2024, 8:22pm
2
i ran my step again, and now get a new error: Please retry your event or follow this troubleshooting guide: GitHub
user-1
(User 1)
December 27, 2024, 8:22pm
3
ran it a third time, back to: No module named ‘google.generativeai’
user-1
(User 1)
December 27, 2024, 8:22pm
4
Did you add a magic comment for that import?
user-1
(User 1)
December 27, 2024, 8:22pm
6
but… why? docs seem to imply i shouldnt need to, right?
user-1
(User 1)
December 27, 2024, 8:22pm
7
oh… kinda reading more closely, and i think i see it
user-1
(User 1)
December 27, 2024, 8:22pm
8
In this case you’ll need to, since the import name is different from the pypi package name
user-1
(User 1)
December 27, 2024, 8:22pm
9
Yeah so the workflow can install the necessary packages with pip
user-1
(User 1)
December 27, 2024, 8:22pm
10
didnt click… now it does.
user-1
(User 1)
December 27, 2024, 8:22pm
11
and its working. i promise to not ask again until i forget in 6 months