在做的項目使用Django
做后端,發現使用python3 manage.py runserver
時能夠正常啟動,使用uwsgi
時報錯
Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings'
linux上的python版本是2.7,用virtualenv創建虛擬環境目錄是python2.7的,你安裝了python3使用virtualenv是用python2.7的,只能重新安裝