ImportError: No module named flask.ext.login

前端 未结 8 1991
刺人心
刺人心 2021-02-06 22:54

I have a problem with flask_login module.

i have installed flask_login module successfully. Also from the command prompt i can run this script easily with no error:

8条回答
  •  执念已碎
    2021-02-06 23:26

    This is an environment error -- whatever IDE you're using doesn't have the PYTHONPATH set properly. You can test this out by creating a small test file: test.py, with the following contents:

    from os import environ
    print environ.get('PYTHONPATH')
    

    If the PYTHONPATH doesn't contain the directory that holds your Flask-Login package, then that's the issue.

提交回复
热议问题