https://prefect.io logo
Title
t

Tyndyll

05/17/2022, 12:22 PM
Can someone help with a flow running problem using Github storage?
I've registered the flow sucessfullly with Prefect cloud, but when trying to execute on an agent I am getting an
ImportError('Unable to import Github, please ensure you have installed the github extra')
error. As far as I am aware it has been installed
prefect@ubuntu-focal:~$ . prefect-default/bin/activate
(prefect-default) prefect@ubuntu-focal:~$ python
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from prefect.storage import GitHub
>>>
a

Anna Geller

05/17/2022, 12:32 PM
prefect.storage.GitHub is just the Prefect class for interacting with GitHub, you also need to install the
github
Python library, e.g. using:
pip install "prefect[github]"
t

Tyndyll

05/17/2022, 12:35 PM
Got it - was installed in the system environment but not the venv
👍 1
While you're here - should it pull down the entire repo?
(And thank you by the way - sorry - trying to get a demo ready for someone)
👍 1
a

Anna Geller

05/17/2022, 12:38 PM
technically yes, it will pull the entire repo but you shouldn't rely on the presence of the entire codebase in your execution environment - you should treat it as if this would pull only the flow code
t

Tyndyll

05/17/2022, 12:45 PM
Good to know! Thanks
👍 1
t

Tarek

06/02/2022, 11:58 AM
hi, i have the same import problem, i executed
pip install "prefect[github]"
locally, but the problem persists, or should be installed on the agent docke container also?
a

Anna Geller

06/02/2022, 12:15 PM
yes, it should, correct - it depends on your setup though - feel free to open a separate thread so that it's easier to track