uwsgi + Flask + virtualenv ImportError: no module named site

前端 未结 8 683
感动是毒
感动是毒 2021-02-05 07:37

(Other posts on SO are similar, but none have the specific combination of uwsgi + Flask + virtualenv) (This one is closest)

I installed uwsgi via apt-get. I also tried

8条回答
  •  感情败类
    2021-02-05 08:06

    I encountered the same and my problem was with the python version where uwsgi was running. uwsgi was running on python2 yet my virtualenv python path was set to python3. This created the conflict, it kept on failing to locate the installed site package.

    Double check the python version where uwsgi is running so that it is the same as that set on your virtualenv.

提交回复
热议问题