New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 2.7 Error - ImportError: cannot import name Github #472
Comments
|
|
Hmm, that is very strange, possible that you have conflicting dependencies? Can you list the results of |
pip freeze: prettytable==0.7.2 PyGithub==1.29 requests==2.11.1 On Wed, Oct 12, 2016 at 10:23 AM, Andrew Gross notifications@github.com
|
In the directory you are working in, do you have a file called |
Yes sir. On Wed, Oct 12, 2016 at 10:51 AM, Andrew Gross notifications@github.com
|
Yes sir, github.py On Wed, Oct 12, 2016 at 11:27 AM, Anthony Zatelli azatelli@gmail.com
|
Yep, that'll do it. Python will try to import from that file first, try changing the name of your local file and it should work. |
Awesome! Thank you. :) On Wed, Oct 12, 2016 at 11:41 AM, Andrew Gross notifications@github.com
|
I met the same problem. then I got here. Thank you! |
I was facing the similar issue. This helped. Thanks |
I met the same problem. then I got here. Thank you! |
Thanks @andrewgross |
LOL we all got into the |
Haaaaaa. yep. Thanks for this! |
Just fell into the trap myself. |
me too! |
@andrewgross so I don’t have a file named github.py, but I do have a folder labeled ‘’’init.py’’’. I am receiving the same Import error for github |
Is your folder named |
I believe it is. I will check again tomorrow at school. I will let you know when I am 100% sure. Sincerely, Jalen GriffinOn Apr 2, 2023, at 11:58 AM, Andrew Gross ***@***.***> wrote:
Is your folder named github?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Ok, you should make sure you don't have a folder, file or class named Github to avoid the import issues. |
This is fixed my issue |
1 similar comment
This is fixed my issue |
import github works but nothing seems to be under github. Using Python 2.7.
pip install PyGithub
Thoughts?
The text was updated successfully, but these errors were encountered: