Flask - WSGI - No module named 'flask'

后端 未结 6 837
闹比i
闹比i 2021-02-01 23:50

I\'ve been following Sentdex\' Flask tutorial. He\'s using a Venv to set up his Flask, but didn\'t set his Python up to work with a Venv. I\'ve tried installing Flask globally -

6条回答
  •  执笔经年
    2021-02-02 00:46

    Nothing worked for me, but I just add below line in starting of my .py and .wsgi file voila it worked:

    import sys
    sys.path.append('/home/ubuntu/pythonVirtual/lib/python3.6/site-packages)

    here pythonVirtual is my virtual directory for Python

提交回复
热议问题