ib-lundgren / flask-oauthprovider

Create a secure OAuth provider easily, powered by OAuthLib
BSD 3-Clause "New" or "Revised" License
86 stars 21 forks source link

ImportError: No module named flask.ext.oauthprovider #4

Closed alasarr closed 11 years ago

alasarr commented 11 years ago

Hi!

When I try tu run: python flask-oauthprovider/examples/runserver.py

it says:

Traceback (most recent call last): File "flask-oauthprovider/examples/runserver.py", line 1, in from demoprovider import app File "/Users/alasarr/dev/geoscope/api/flask-oauthprovider/examples/demoprovider/init.py", line 2, in from provider import ExampleProvider File "/Users/alasarr/dev/geoscope/api/flask-oauthprovider/examples/demoprovider/provider.py", line 2, in from flask.ext.oauthprovider import OAuthProvider File "/Users/alasarr/dev/geoscope/api/venv/lib/python2.7/site-packages/flask/exthook.py", line 86, in load_module raise ImportError('No module named %s' % fullname) ImportError: No module named flask.ext.oauthprovider

alasarr commented 11 years ago

Sorry, It was a problem with my python installation. Everything is working fine

gijs commented 11 years ago

@alasarr, what was the problem with your Python installation? I'm getting the same error... thx!

alasarr commented 11 years ago

This is a issue with the python path, you've to add the folders (flask-oauthprovider and oauthlib) to your PYTHONPATH.

I'm working with eclipse with pyDev module so you can add folders to the python path in the project properties window.

For command line you have to edit the file venv/bin/activate and add at the top:

export PYTHONPATH="//flaskoauthprovider://oauthlib"

I'm not a python Guru, so I don't know if there is a way to configure it automatically. Please let me know i you find a way.

gijs commented 11 years ago

Thanks! It works!

ghost commented 11 years ago

@alasarr, Can you please tell me how to setup flaskoauthprovider using PyDev? I am a beginner in Python development. I appreciate your help

alasarr commented 11 years ago

@prashama Right-click on project->Properties->pyDev - PYTHONPATH. Clik on add source folder and add:

Captura de pantalla 2013-03-24 a la s 10 32 25