Created
November 4, 2014 14:02
-
-
Save ChillarAnand/a025676a8d043e0f11fa to your computer and use it in GitHub Desktop.
py & py3 wsgi conflicts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From your traceback, flask_bootstrap is installed at /usr/local/lib/python3.4/dist-packages in your server. | |
So you have to add this sys.path[0] | |
Lets do a simple test. | |
Create a test2.py and run it with `python test.py` | |
import sys | |
print(sys.path) | |
import flask_bootstrap | |
It should throw an error because you have py3 flask bootstrap but not py2 flask bootstrap. | |
Now create test3.py and run it with `python test3.py` | |
import sys | |
print(sys.path) | |
sys.path.insert(0, 'usr/local/lib/python3.4/dist-packages') | |
import flask_bootstrap | |
Now it should work correctly. | |
If it works, then use this wsgi path. | |
WSGIPythonPath /var/www/davidystephenson/davidystephenson/:/usr/local/lib/python3/site-packages | |
If you restart everything should work fine. | |
If it still not working then add this line everytime just before you import flask_bootstrap | |
sys.path.insert(0, 'usr/local/lib/python3.4/dist-packages') | |
So that it finds it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment