Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModuleNotFoundError: No module named 'github'

trying to import github (PyGithub) but it keeps giving the same error, even though the lib is fully installed.

Code:

from github import Github

Output:

Traceback (most recent call last):
  File "...path", line 1, in <module>
    from github import Github
ModuleNotFoundError: No module named 'github'

Anyone know how to fix this issue?

like image 536
Quarlie Avatar asked Aug 16 '26 09:08

Quarlie


1 Answers

This will install the package.

pip3 install PyGithub

If you're getting the same error that could be due to circular imports. Rename if you have any .py files named "github.py" in your work folder.

like image 91
Niyu Avatar answered Aug 17 '26 21:08

Niyu