ModuleNotFoundError: No module named 'github' but i pip installed pygithub? #1964
Answered
by
aahnik
Captain8771
asked this question in
Q&A
-
|
trying to run the file gives: ================= RESTART: C:/Users/RCG/Downloads/GiTest.py =================
Traceback (most recent call last):
File "C:/Users/RCG/Downloads/GiTest.py", line 1, in <module>
from github import Github
ModuleNotFoundError: No module named 'github'The code is from github import Github
g = Github("token")
for repo in g.get_user().get_repos():
print(repo.name)Yes i have pip installed pygithub. |
Beta Was this translation helpful? Give feedback.
Answered by
aahnik
May 30, 2021
Replies: 1 comment 1 reply
-
|
Do you have proper installation of python and pip? Many windows users don't have. It's best to use virtual environments. Step 1. Create a virtual environment and activate it (tutorial ) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
s-t-e-v-e-n-k
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you have proper installation of python and pip? Many windows users don't have.
It's best to use virtual environments.
Step 1. Create a virtual environment and activate it (tutorial )
Step 2. Run
python --versionandpip --versionto check if everything all right.Step 3. Run
pip listto see list of packages installedStep 4. Run
pip install --upgrade PyGitHubStep 5. To check if the installation succeeded, run
pip show PyGitHub