I am looking to use the Python-Instagram package. I have downloaded the package using the script that is provided on https://github.com/Instagram/python-instagram.
I
I just had this same problem and it turned out that I had file named instagram.py in the same package as the file where I was getting this error. So, it was just a name collision. I renamed my local file and everything worked fine.
Did you put the name "instagram" on the file? This might be your problem.
After seeing this link, which describes the same error, I realized my mistake.
You may end up here like I did, and even by having
from InstagramAPI import InstagramAPI
and everything else correctly set I still got the error:
ImportError: No module named InstagramAPI
I was stupid enough to have InstagramAPI installed in one venv and was using another venv to run my project... dah
pip install python-instagram
(you may require administrator/sudo privileges for this)instagram
directory to your python's dist-package
directory or site-package
directory (whatever is relevant to you)You should then be able to import InstagramAPI with
from instagram.client import InstagramAPI