0

So I'm trying to make a simple app using the Flask framework and the Instagram API.

I have my application set up and everything is working well. But how can I import the Instagram module in my application?

I have run the $ pip install python-instagram, but when I try to import the module into my script I get the ImportError: No module named instagram

So how can I utilize the Instagram Python API in Flask?

Thanks in advance!

UPDATE

I followed this tutorial to set up Flask on my computer. It's running on virtualenv on folder on my computer. When I installed the Instagram Python API it was put in a folder /build inside my app which looks like this:

instapp/
-- app/
   -- __init__.py
   -- static
   -- templates
   -- views.py

-- build/
   -- httplib2/
   -- python-instagram/
   -- simplejson/

-- flask/
   -- bin/
   -- include/
   -- lib/

-- run.py
-- tmp
-- virtualenv.py
3
  • Obviously the module is not in the right place. People here cannot really help you with that issue without having much more information about your setup. Jun 20, 2013 at 10:56
  • Thanks, added an update to the question.
    – Ismailp
    Jun 20, 2013 at 14:21
  • 4
    When you install instagram you have to use the pip from the virtualenv (i.e. flask/bin/pip), not the global pip. When I try that here I get everything installed in flask/lib/... which is the expected location. Jun 20, 2013 at 17:05

1 Answer 1

3

As @Miguel pointed out in the comments I used the flask/bin/pip instead of the global pip and everything worked fine! Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.